mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (rb_reg_initialize_m): unfotunate serious typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
467035750e
commit
41bb73b28a
2 changed files with 2 additions and 1 deletions
1
error.c
1
error.c
|
@ -544,6 +544,7 @@ Init_Exception()
|
||||||
rb_define_method(rb_eException, "exception", exc_exception, -1);
|
rb_define_method(rb_eException, "exception", exc_exception, -1);
|
||||||
rb_define_method(rb_eException, "initialize", exc_initialize, -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_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, "message", exc_to_s, 0);
|
||||||
rb_define_method(rb_eException, "inspect", exc_inspect, 0);
|
rb_define_method(rb_eException, "inspect", exc_inspect, 0);
|
||||||
rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
|
rb_define_method(rb_eException, "backtrace", exc_backtrace, 0);
|
||||||
|
|
2
re.c
2
re.c
|
@ -1260,7 +1260,7 @@ rb_reg_initialize_m(argc, argv, self)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s = StringValuePtr(argv[0]);
|
s = StringValuePtr(argv[0]);
|
||||||
len = RREGEXP(argv[0])->len;
|
len = RSTRING(argv[0])->len;
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
|
if (FIXNUM_P(argv[1])) flags = FIX2INT(argv[1]);
|
||||||
else if (RTEST(argv[1])) flags = RE_OPTION_IGNORECASE;
|
else if (RTEST(argv[1])) flags = RE_OPTION_IGNORECASE;
|
||||||
|
|
Loading…
Reference in a new issue