diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-19 22:01:28 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-11-19 12:08:28 +0900 |
| commit | 5bbcea9b3bdb0e7dc048f92cebefb54858196935 (patch) | |
| tree | a9d314112808837e9475ff618244a255d0e0b16e /mrbgems/mruby-hash-ext/mrblib | |
| parent | b5d43a16a38d522aa1d1d1a889585749a6b8086d (diff) | |
| download | mruby-5bbcea9b3bdb0e7dc048f92cebefb54858196935.tar.gz mruby-5bbcea9b3bdb0e7dc048f92cebefb54858196935.zip | |
Removed `try_convert` method from Array and Hash.
Diffstat (limited to 'mrbgems/mruby-hash-ext/mrblib')
| -rw-r--r-- | mrbgems/mruby-hash-ext/mrblib/hash.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/mrbgems/mruby-hash-ext/mrblib/hash.rb b/mrbgems/mruby-hash-ext/mrblib/hash.rb index 5bbbdf559..f1143e25b 100644 --- a/mrbgems/mruby-hash-ext/mrblib/hash.rb +++ b/mrbgems/mruby-hash-ext/mrblib/hash.rb @@ -62,25 +62,6 @@ class Hash ## # call-seq: - # Hash.try_convert(obj) -> hash or nil - # - # Try to convert <i>obj</i> into a hash, using to_hash method. - # Returns converted hash or nil if <i>obj</i> cannot be converted - # for any reason. - # - # Hash.try_convert({1=>2}) # => {1=>2} - # Hash.try_convert("1=>2") # => nil - # - def self.try_convert(obj) - if obj.respond_to?(:to_hash) - obj.to_hash - else - nil - end - end - - ## - # call-seq: # hsh.merge!(other_hash) -> hsh # hsh.merge!(other_hash){|key, oldval, newval| block} -> hsh # |
