Sha256: ae5256699156df900e6231cfe17ec468f8930f26973090eef588846a22c82cf0

Contents?: true

Size: 449 Bytes

Versions: 83

Compression:

Stored size: 449 Bytes

Contents

module BlockSpecs
  class Yield
    def splat(*args)
      yield *args
    end
    
    def two_args
      yield 1, 2
    end
    
    def two_arg_array
      yield [1, 2]
    end

    def yield_splat_inside_block
      [1, 2].send(:each_with_index) {|*args| yield(*args)}
    end
  end
end

# def block_spec_method(*args)
#   yield(*args)
# end
# 
# def block_spec_method2
#   yield 1, 2
# end
# 
# def block_spec_method3
#   yield [1, 2]
# end
# 

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-3.1.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.1.beta spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0.beta.5 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0.beta.4 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0.beta.3 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0.beta.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.1.0.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.2.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.8 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.7 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.6 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.5 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.4 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.3 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.1.beta.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.0 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-3.0.0.beta.7 spec/framework_spec/app/spec/language/fixtures/block.rb