From b1c4052fdf7f77388d4292fe362d970a7305076e Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 8 Aug 2009 17:11:39 +0000 Subject: [PATCH] * tool/compile_prelude.rb: fixes a regexp pattern for require. It had matched 'require("foo"('. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ tool/compile_prelude.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d6974889d..3aea7f2c96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Aug 9 02:07:41 2009 Yuki Sonoda (Yugui) + + * tool/compile_prelude.rb: fixes a regexp pattern for require. + It had matched 'require("foo"('. + Sat Aug 8 11:42:44 2009 Yukihiro Matsumoto * bignum.c (bigzero_p): removing BDIGITS() inside of the diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb index 88b7d69f11..17b00f955a 100755 --- a/tool/compile_prelude.rb +++ b/tool/compile_prelude.rb @@ -51,8 +51,8 @@ lines_list = preludes.map {|filename| "nil" end } - if /require\s*(\(?)\s*(["'])(.*?)\2\s*\1/ =~ line - orig, path = $&, $3 + if /require\s*\(?\s*(["'])(.*?)\1\s*\)?/ =~ line + orig, path = $&, $2 srcdir = File.expand_path("../..", __FILE__) path = File.expand_path(path, srcdir) if File.exist?(path)