1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm.c (vm_backtrace): always returns non-nil array if lev is

negative.  [ruby-core:21795]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-02-03 14:13:36 +00:00
parent e2fc3f38af
commit bca5029d8b
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Feb 3 23:13:34 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (vm_backtrace): always returns non-nil array if lev is
negative. [ruby-core:21795]
Tue Feb 3 21:19:06 2009 TAKAO Kouji <kouji@takao7.net>
* ext/readline/extconf.rb: checked rl_set_screen_size and

3
vm.c
View file

@ -737,6 +737,9 @@ vm_backtrace(rb_thread_t *th, int lev)
{
VALUE ary = 0;
if (lev < 0) {
ary = rb_ary_new();
}
vm_backtrace_each(th, lev, vm_backtrace_push, &ary);
if (!ary) return Qnil;
return rb_ary_reverse(ary);