diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-19 06:07:06 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-19 06:07:06 +0000 |
commit | 15d940b8b0361925e15f412913f346fca4bf3400 (patch) | |
tree | ccf8f87f25f960b7cb90687a9e52af6f1d9072c9 /NEWS | |
parent | 3918bbfac493d7c83371e0491570ea11d53d249a (diff) | |
download | ruby-15d940b8b0361925e15f412913f346fca4bf3400.tar.gz |
* thread.c: add `Thread#backtrace_locations' method.
This method is similart to `caller_locations' method for
specific method.
And fix to accept `level' and `n' parameters for `Thread#backtrace'
and `Thread#backtrace_locations'.
`caller' (and `caller_locations') do not return `caller' method
frame.
However, `Thread#backtrace' (and `Thread#backtrace_locations')
return `Thread#backtrace' method frame itself
if `Thread.current.backtrace' was called.
* vm_backtrace.c: ditto.
* internal.h: ditto.
* test/ruby/test_backtrace.rb: add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -56,6 +56,8 @@ with all sufficient information, see the ChangeLog file. * added Kernel#using, which imports refinements into the current scope. [experimental] * added Kernel#__dir__ which returns a current dirname. + * added Kernel#caller_locations which returns an array of + frame information objects. * extended method: * Kernel#warn accepts multiple args in like puts. * Kernel#caller accepts second optional argument `n' which specify @@ -125,6 +127,8 @@ with all sufficient information, see the ChangeLog file. variable keys. * added Thread#thread_variable? for testing to see if a particular thread variable has been set. + * added Thread#backtrace_locations which returns similar information of + Kernel#caller_locations. * Time * change return value: |