Class: Enumerator
Instance Method Summary collapse
Instance Method Details
#initialize_with_optional_block(*arg, &block) ⇒ Object
7 8 9 10 |
# File 'lib/backports/1.9/enumerator.rb', line 7 def initialize_with_optional_block(*arg, &block) return initialize_without_optional_block(*arg, &nil) unless arg.empty? # Ruby 1.9 apparently ignores the block if any argument is present initialize_without_optional_block(Backports::Yielder.new(&block)) end |