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-2.2.6 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.6.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.5 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.5.beta.3 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.5.beta.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.5.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.4.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.3 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.3.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.2.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.1.beta.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.1.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.0 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.0.beta.3 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.0.beta.2 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.2.0.beta.1 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.1.0 spec/framework_spec/app/spec/language/fixtures/block.rb
rhodes-2.0.3 spec/framework_spec/app/spec/language/fixtures/block.rb