diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-18 03:59:15 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-04-18 03:59:15 +0000 |
commit | 62c9ecfa122da546af36ed5a31e8696c62ced036 (patch) | |
tree | 40fd17671b67821d024a1d47beb5a22d1faad43b /object.c | |
parent | cc6ab53f592016daf6f4ef0075e4f33f365d638f (diff) | |
download | ruby-62c9ecfa122da546af36ed5a31e8696c62ced036.tar.gz |
Revert r35339-35343 because of no tests.
* hash.c: Alias ENV.to_h to ENV.to_hash [ref #6276]
* lib/ostruct.rb: Add OpenStruct#to_h [Feature #6276]
* struct.c: Add Struct#to_h [Feature #6276]
* object.c: Add NilClass#to_h [Feature #6276]
* hash.c: Add Hash#to_h [Feature #6276]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 18 |
1 files changed, 0 insertions, 18 deletions
@@ -1058,23 +1058,6 @@ nil_to_a(VALUE obj) } /* - * Document-method: to_h - * - * call-seq: - * nil.to_h -> {} - * - * Always returns an empty hash. - * - * nil.to_h #=> {} - */ - -static VALUE -nil_to_h(VALUE obj) -{ - return rb_hash_new(); -} - -/* * call-seq: * nil.inspect -> "nil" * @@ -2913,7 +2896,6 @@ Init_Object(void) rb_define_method(rb_cNilClass, "to_f", nil_to_f, 0); rb_define_method(rb_cNilClass, "to_s", nil_to_s, 0); rb_define_method(rb_cNilClass, "to_a", nil_to_a, 0); - rb_define_method(rb_cNilClass, "to_h", nil_to_h, 0); rb_define_method(rb_cNilClass, "inspect", nil_inspect, 0); rb_define_method(rb_cNilClass, "&", false_and, 1); rb_define_method(rb_cNilClass, "|", false_or, 1); |