ruby-changes:2232
From: ko1@a...
Date: 16 Oct 2007 19:48:21 +0900
Subject: [ruby-changes:2232] nobu - Ruby:r13723 (trunk): * re.c (rb_reg_s_union): check for encoding of original object.
nobu 2007-10-16 19:48:02 +0900 (Tue, 16 Oct 2007)
New Revision: 13723
Modified files:
trunk/ChangeLog
trunk/re.c
Log:
* re.c (rb_reg_s_union): check for encoding of original object.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13723&r2=13722
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=13723&r2=13722
Index: re.c
===================================================================
--- re.c (revision 13722)
+++ re.c (revision 13723)
@@ -1776,15 +1776,17 @@
for (i = 0; i < argc; i++) {
volatile VALUE v;
+ VALUE e = rb_ary_entry(args0, i);
if (0 < i)
rb_str_buf_cat2(source, "|");
- v = rb_check_regexp_type(rb_ary_entry(args0, i));
- rb_enc_check(tmp, v);
+ v = rb_check_regexp_type(e);
if (!NIL_P(v)) {
+ rb_enc_check(tmp, v);
v = rb_reg_to_s(v);
}
else {
- v = rb_reg_s_quote(Qnil, rb_ary_entry(args0, i));
+ rb_enc_check(tmp, e);
+ v = rb_reg_s_quote(Qnil, e);
}
rb_str_buf_append(source, v);
}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13722)
+++ ChangeLog (revision 13723)
@@ -1,3 +1,7 @@
+Tue Oct 16 19:48:01 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * re.c (rb_reg_s_union): check for encoding of original object.
+
Tue Oct 16 18:28:51 2007 Tanaka Akira <akr@f...>
* debug.c: use enum for constants for gdb if possible.
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml