diff options
| -rw-r--r-- | mrblib/hash.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mrblib/hash.rb b/mrblib/hash.rb index cd6ba8935..9dcfb7e94 100644 --- a/mrblib/hash.rb +++ b/mrblib/hash.rb @@ -162,6 +162,8 @@ class Hash # 1.9 Hash#select! returns Hash; ISO says nothing. def select!(&b) + return to_enum :select! unless block_given? + keys = [] self.each_key{|k| v = self[k] @@ -178,6 +180,8 @@ class Hash # 1.9 Hash#select returns Hash; ISO says nothing. def select(&b) + return to_enum :select unless block_given? + h = {} self.each_key{|k| v = self[k] |
