* ruby.c (process_options): revert r25330, so that $0 can be seen

from required libraries by -r option.  [ruby-core:23717]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-06-05 00:57:02 +00:00
parent fd4417f8fe
commit b83fc8735f
4 changed files with 19 additions and 7 deletions

10
vm.c
View file

@ -761,8 +761,14 @@ vm_backtrace_push(void *arg, VALUE file, int line_no, VALUE name)
VALUE *aryp = arg;
VALUE bt;
bt = rb_enc_sprintf(rb_enc_compatible(file, name), "%s:%d:in `%s'",
RSTRING_PTR(file), line_no, RSTRING_PTR(name));
if (line_no) {
bt = rb_enc_sprintf(rb_enc_compatible(file, name), "%s:%d:in `%s'",
RSTRING_PTR(file), line_no, RSTRING_PTR(name));
}
else {
bt = rb_enc_sprintf(rb_enc_compatible(file, name), "%s:in `%s'",
RSTRING_PTR(file), RSTRING_PTR(name));
}
rb_ary_push(*aryp, bt);
return 0;
}