Sha256: 5f47cc6bac430f96028c3fe5379680215d97ccb2b492a05f4d4fd717dd474437
Contents?: true
Size: 644 Bytes
Versions: 1
Compression:
Stored size: 644 Bytes
Contents
require 'nano/binding/eval' require 'nano/kernel/call_stack' class Binding # Returns the call stack, in array format. def call_stack( level = 1 ) eval( "call_stack( #{level} )" ) 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_call_stack assert_instance_of( Array, @bind.call_stack ) end end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-0.9.0 | lib/nano/binding/call_stack.rb |