summaryrefslogtreecommitdiffhomepage
path: root/mrblib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-05-10 11:14:55 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-05-10 11:14:55 +0900
commite59c6a1100caeed7d656142094d413de6e2752fa (patch)
tree3e24569251a5f492dbf3a39de53a1c1bd44c7a93 /mrblib
parent3e2c5da4437f593c6068599e9377d1fbfdfbbfb7 (diff)
parent658a00ba4927b433420c9b26dcbc2365fb657f2b (diff)
downloadmruby-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 'mrblib')
-rw-r--r--mrblib/hash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrblib/hash.rb b/mrblib/hash.rb
index 5828a13eb..315a0c86e 100644
--- a/mrblib/hash.rb
+++ b/mrblib/hash.rb
@@ -179,7 +179,7 @@ class Hash
# ISO 15.2.13.4.22
def merge(other, &block)
h = {}
- 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)
other = other.to_hash
self.each_key{|k| h[k] = self[k]}
if block