Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b8d8c50785
Fetching contributors…

Cannot retrieve contributors at this time

13 lines (11 sloc) 0.35 kb
require 'abstract_unit'
require 'active_support/core_ext/proc'
class ProcTests < ActiveSupport::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
Jump to Line
Something went wrong with that request. Please try again.