summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-26 04:49:23 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-26 04:49:23 +0000
commit4f54d4710e1edfbcb8b0d7d7feea1bd8c519229f (patch)
treed70505cbff9b7012a1871cd0d69a86c31ad79792 /struct.c
parentfbf531c4a249e75260e80ed767114b02e0a1e985 (diff)
* vm.c (RubyVM::FrameInfo): add a class to access each frame
information. You don't need to parse strings from caller(). FrameInfo has the following methods: FrameInfo#name: method name, class name, etc with decorations. FrameInfo#basename: name without decorations. FrameInfo#line_no: line number. FrameInfo#filename: file name. FrameInfo#filepath: full filepath. FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script) FrameInfo#to_s: return caller() method style string. RubyVM::FrameInfoFrameInfo.caller(n, lev) returns array of FrameInfo objects. The name "RubyVM::FrameInfoFrameInfo.caller" is long and ambiguous (same as caller() method), we need to change the name before Ruby 2.0 release. Good names or comments are welcome. * test/ruby/test_backtrace.rb: add a test for above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions