diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-18 02:52:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-18 02:52:10 +0000 |
commit | a74c11cd4ae132d3019f684d1615c635587bfda7 (patch) | |
tree | 87f7c53868c255dda067aecc23e11831ca768c99 | |
parent | 879d41e22c7ef558aba93f93cf16632ba2e03a54 (diff) | |
download | ruby-a74c11cd4ae132d3019f684d1615c635587bfda7.tar.gz |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | re.c | 6 |
2 files changed, 10 insertions, 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. @@ -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); |