Sha256: 92ea41226e813355af2b471aadba197fe384dee0b7dd8787f66b1cd044ea8660
Contents?: true
Size: 337 Bytes
Versions: 69
Compression:
Stored size: 337 Bytes
Contents
require File.dirname(__FILE__) + '/../abstract_unit' class ProcTests < Test::Unit::TestCase def test_bind_returns_method_with_changed_self block = Proc.new { self } assert_equal self, block.call bound_block = block.bind("hello") assert_not_equal block, bound_block assert_equal "hello", bound_block.call end end
Version data entries
69 entries across 69 versions & 3 rubygems