summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-09-26 13:04:13 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-09-26 23:09:48 +0900
commit54ec08c7f19e7c46de3dcb63e4f30cd65e4a56e7 (patch)
treed4d8c125af24a62d03692bfc073acf2c46f79061 /mrblib
parentd78acc7afed35813f25e3091150dab668c373f05 (diff)
downloadmruby-54ec08c7f19e7c46de3dcb63e4f30cd65e4a56e7.tar.gz
mruby-54ec08c7f19e7c46de3dcb63e4f30cd65e4a56e7.zip
Implement `Hash#rehash` in C using `sg_compact()`.
Diffstat (limited to 'mrblib')
-rw-r--r--mrblib/hash.rb20
1 files changed, 0 insertions, 20 deletions
diff --git a/mrblib/hash.rb b/mrblib/hash.rb
index 245b76ee0..582cfbc6c 100644
--- a/mrblib/hash.rb
+++ b/mrblib/hash.rb
@@ -317,26 +317,6 @@ class Hash
}
h
end
-
- ##
- # call-seq:
- # hsh.rehash -> hsh
- #
- # Rebuilds the hash based on the current hash values for each key. If
- # values of key objects have changed since they were inserted, this
- # method will reindex <i>hsh</i>.
- #
- # h = {"AAA" => "b"}
- # h.keys[0].chop!
- # h #=> {"AA"=>"b"}
- # h["AA"] #=> nil
- # h.rehash #=> {"AA"=>"b"}
- # h["AA"] #=> "b"
- #
- def rehash
- # do nothing (for now)
- self
- end
end
##