Ruby Newbie homepage Ruby Newbie homepage

How to use

Quick guide

Official content
If obj is a Hash object, returns obj.
Otherwise if obj responds to :to_hash, calls obj.to_hash and returns the result.
Returns nil if obj does not respond to :to_hash
Raises an exception unless obj.to_hash returns a Hash object.
               static VALUE
rb_hash_s_try_convert(VALUE dummy, VALUE hash)
    return rb_check_hash_type(hash);

Was this page useful?