mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regparse.c (onig_syntax_warn): do not use external strings as
printf format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4acf013ffd
commit
3642fa1992
3 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon May 31 19:25:58 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* regparse.c (onig_syntax_warn): do not use external strings as
|
||||
printf format.
|
||||
|
||||
Mon May 31 18:22:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* misc/ruby-mode.el (ruby-mode-set-encoding): skip shebang line
|
||||
|
|
|
@ -2859,9 +2859,9 @@ onig_syntax_warn(ScanEnv *env, const char *fmt, ...)
|
|||
(const UChar *)fmt, args);
|
||||
va_end(args);
|
||||
if (env->sourcefile == NULL)
|
||||
rb_warn((char *)buf);
|
||||
rb_warn("%s", (char *)buf);
|
||||
else
|
||||
rb_compile_warn(env->sourcefile, env->sourceline, (char *)buf);
|
||||
rb_compile_warn(env->sourcefile, env->sourceline, "%s", (char *)buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -823,4 +823,8 @@ class TestRegexp < Test::Unit::TestCase
|
|||
assert_in_out_err('-w', 'x=/[\u3042\u3042]/', [], /duplicated/)
|
||||
assert_in_out_err('-w', 'x=/[\u3042\u3041-\u3043]/', [], /duplicated/)
|
||||
end
|
||||
|
||||
def test_property_warn
|
||||
assert_in_out_err('-w', 'x=/\p%s/', [], %r"warning: invalid Unicode Property \\p: /\\p%s/")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue