diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-04 10:55:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-04 10:55:48 +0900 |
| commit | 786ed10d59372433aefdf5451f081ba7aa2964be (patch) | |
| tree | f88f2c0f9891b8929d0886affadfdc4526ab10be /mrblib/hash.rb | |
| parent | b8ab6af39d092fab099932877e2eb0f9676bfce6 (diff) | |
| download | mruby-786ed10d59372433aefdf5451f081ba7aa2964be.tar.gz mruby-786ed10d59372433aefdf5451f081ba7aa2964be.zip | |
call to_hash before replacing hash
Diffstat (limited to 'mrblib/hash.rb')
| -rw-r--r-- | mrblib/hash.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrblib/hash.rb b/mrblib/hash.rb index 978fb367b..539efcdf3 100644 --- a/mrblib/hash.rb +++ b/mrblib/hash.rb @@ -156,6 +156,7 @@ class Hash # ISO 15.2.13.4.23 def replace(hash) self.clear + hash = hash.to_hash hash.each_key{|k| self[k] = hash[k] } |
