Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/zfstools.rb

Overview

Ruby 1.8 compat for select!

Instance Method Summary collapse

Instance Method Details

#select!(&block) ⇒ Object



8
9
10
11
# File 'lib/zfstools.rb', line 8

def select!(&block)
  return to_enum(:select!) unless block_given?
  reject!{|key, value| ! yield key, value}
end