Sha256: 1c832c0fda8ea3498d85a71b2490ee16b0dcc634f3ec53859984e1296c5d7737
Contents?: true
Size: 487 Bytes
Versions: 52
Compression:
Stored size: 487 Bytes
Contents
require 'spec_helper' class RuntimeOpalBlockSendSpec def simple 42 end def yielder(&block) yield 3.142 end end describe "Opal.block_send()" do before do @obj = RuntimeOpalBlockSendSpec.new end it "calls receiver with given method" do `Opal.block_send(#{@obj}, 'simple')`.should == 42 end it "calls method with given block" do val = nil p = proc { |a| val = a } `Opal.block_send(#{@obj}, 'yielder', p)` val.should == 3.142 end end
Version data entries
52 entries across 52 versions & 3 rubygems