Sha256: 317d339c07698e79f45f64f344bdd4ffe9affbc474480ec68c8713670f8db865
Contents?: true
Size: 663 Bytes
Versions: 1
Compression:
Stored size: 663 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/binding/self/of_caller.rb # # Extracted Fri Feb 16 02:00:37 EST 2007 # Project.rb Test Extraction # require 'facets/core/binding/self/of_caller.rb' require 'test/unit' class TC_Binding < Test::Unit::TestCase def inc_counter(amount = 1) Binding.of_caller do |binding| inc = eval("lambda { |arg| counter += arg }", binding) inc.call(amount) end end def test_of_caller counter = 0 2.times { inc_counter } assert_equal( 2, counter ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/binding/self/test_of_caller.rb |