Sha256: 2e9025be78b7a7d94bf2e1d4a7b3374e5b02b099b3ed45f73ad486dd0a9c77b2

Contents?: true

Size: 308 Bytes

Versions: 8

Compression:

Stored size: 308 Bytes

Contents

require '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

8 entries across 7 versions & 4 rubygems

Version Path
kajam-1.0.3.rc2 vendor/rails/activesupport/test/core_ext/proc_test.rb
radiant-1.0.0.rc2 vendor/rails/activesupport/test/core_ext/proc_test.rb
radiant-1.0.0.rc1 vendor/rails/activesupport/test/core_ext/proc_test.rb
radiant-0.9.0.rc2 vendor/rails/activesupport/test/core_ext/proc_test.rb
usher-0.7.0 spec/rails2_3/vendor/rails/vendor/rails/activesupport/test/core_ext/proc_test.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/activesupport/test/core_ext/proc_test.rb
antfarm-0.3.0 rails/vendor/rails/activesupport/test/core_ext/proc_test.rb
antfarm-0.4.0 rails/vendor/rails/activesupport/test/core_ext/proc_test.rb