mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
* re.c (rb_memsearch): algolithm body of String#index.
* error.c (Init_Exception): "to_str" removed. * eval.c (eval): should not rely on Exception#to_str * eval.c (compile_error): ditto. * error.c (err_append): ditto. * hash.c (rb_hash_merge): Hash#merge, non destructive "update". now there's also Hash#merge! which is an alias to "update". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e58e5cb5ca
commit
0c90036fd1
9 changed files with 108 additions and 63 deletions
3
error.c
3
error.c
|
@ -544,7 +544,6 @@ Init_Exception()
|
|||
rb_define_method(rb_eException, "exception", exc_exception, -1);
|
||||
rb_define_method(rb_eException, "initialize", exc_initialize, -1);
|
||||
rb_define_method(rb_eException, "to_s", exc_to_s, 0);
|
||||
rb_define_method(rb_eException, "to_str", exc_to_s, 0);
|
||||
rb_define_method(rb_eException, "message", exc_to_s, 0);
|
||||
rb_define_method(rb_eException, "inspect", exc_inspect, 0);
|
||||
rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
|
||||
|
@ -1115,7 +1114,7 @@ err_append(s)
|
|||
ruby_errinfo = rb_exc_new2(rb_eSyntaxError, s);
|
||||
}
|
||||
else {
|
||||
VALUE str = rb_str_to_str(ruby_errinfo);
|
||||
VALUE str = rb_obj_as_string(ruby_errinfo);
|
||||
|
||||
rb_str_cat2(str, "\n");
|
||||
rb_str_cat2(str, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue