mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* re.c (re_warn): defined to restore warnings for /[a-c-e]/, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
879d41e22c
commit
a74c11cd4a
2 changed files with 10 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Feb 18 11:51:19 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* re.c (re_warn): defined to restore warnings for /[a-c-e]/, etc.
|
||||
|
||||
Mon Feb 18 10:17:42 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/pty/lib/expect.rb (IO#expect): check if peer is closed.
|
||||
|
|
6
re.c
6
re.c
|
@ -3151,6 +3151,10 @@ rb_reg_s_last_match(int argc, VALUE *argv)
|
|||
return match_getter();
|
||||
}
|
||||
|
||||
static void
|
||||
re_warn(const char* s) {
|
||||
rb_warn("%s" ,s);
|
||||
}
|
||||
|
||||
/*
|
||||
* Document-class: Regexp
|
||||
|
@ -3169,6 +3173,8 @@ Init_Regexp(void)
|
|||
|
||||
onigenc_set_default_caseconv_table((UChar*)casetable);
|
||||
onigenc_set_default_encoding(ONIG_ENCODING_ASCII);
|
||||
onig_set_warn_func(re_warn);
|
||||
onig_set_verb_warn_func(re_warn);
|
||||
|
||||
rb_define_virtual_variable("$~", match_getter, match_setter);
|
||||
rb_define_virtual_variable("$&", last_match_getter, 0);
|
||||
|
|
Loading…
Reference in a new issue