diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-10 11:14:55 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-10 11:14:55 +0900 |
| commit | e59c6a1100caeed7d656142094d413de6e2752fa (patch) | |
| tree | 3e24569251a5f492dbf3a39de53a1c1bd44c7a93 /mrbgems/mruby-hash-ext/mrblib/hash.rb | |
| parent | 3e2c5da4437f593c6068599e9377d1fbfdfbbfb7 (diff) | |
| parent | 658a00ba4927b433420c9b26dcbc2365fb657f2b (diff) | |
| download | mruby-e59c6a1100caeed7d656142094d413de6e2752fa.tar.gz mruby-e59c6a1100caeed7d656142094d413de6e2752fa.zip | |
Merge pull request #2226 from yui-knk/hash-merge-error
Change to raise TypeError (Hash#merge, #merge!)
Diffstat (limited to 'mrbgems/mruby-hash-ext/mrblib/hash.rb')
| -rw-r--r-- | mrbgems/mruby-hash-ext/mrblib/hash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb index 259b0fa12..71a518238 100644 --- a/mrbgems/mruby-hash-ext/mrblib/hash.rb +++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb @@ -22,7 +22,7 @@ class Hash # def merge!(other, &block) - raise "can't convert argument into Hash" unless other.respond_to?(:to_hash) + raise TypeError, "can't convert argument into Hash" unless other.respond_to?(:to_hash) if block other.each_key{|k| self[k] = (self.has_key?(k))? block.call(k, self[k], other[k]): other[k] |
