1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merges r29410 from trunk into ruby_1_9_2.

--
* parse.y (regexp): dregexp has literal string only at the head
  and successors are array.  [ruby-core:32682]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@29572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2010-10-23 13:02:52 +00:00
parent 1cdb944024
commit ac83fcdc8e
4 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Oct 4 12:43:47 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (regexp): dregexp has literal string only at the head
and successors are array. [ruby-core:32682]
Tue Aug 10 11:26:33 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.

View file

@ -3890,7 +3890,8 @@ regexp : tREGEXP_BEG regexp_contents tREGEXP_END
if (nd_type(list->nd_head) == NODE_STR) {
VALUE tail = list->nd_head->nd_lit;
if (reg_fragment_check(tail, options) && prev && !NIL_P(prev->nd_lit)) {
if (!literal_concat0(parser, prev->nd_lit, tail)) {
VALUE lit = prev == node ? prev->nd_lit : prev->nd_head->nd_lit;
if (!literal_concat0(parser, lit, tail)) {
node = 0;
break;
}

View file

@ -107,6 +107,8 @@ class TestRubyLiteral < Test::Unit::TestCase
def test_dregexp
assert_instance_of Regexp, /re#{'ge'}xp/
assert_equal(/regexp/, /re#{'ge'}xp/)
bug3903 = '[ruby-core:32682]'
assert_raise(SyntaxError, bug3903) {eval('/[#{"\x80"}]/')}
end
def test_array

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 25
#define RUBY_PATCHLEVEL 26
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1