Sha256: eabce9921b7c81f87e06dd0464a81a931f5eb77c7a8af6a2e537cccc54acbd2b
Contents?: true
Size: 671 Bytes
Versions: 1
Compression:
Stored size: 671 Bytes
Contents
class Binding # Evaluate a Ruby source code string (or block) in the binding context def eval( str ) #='', &blk ) #if block_given? # Kernel.eval( self, &blk ) #elsif str Kernel.eval( str, self ) #end end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCBinding < Test::Unit::TestCase def setup a = 1 b = 2 x = "hello" # the line number must be updated if it moves @bind = binding; @this_line_no = 25 end def test_eval assert_equal( "hello", @bind.eval("x") ) end end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-0.9.0 | lib/nano/binding/eval.rb |