summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:51:12 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:51:12 +0000
commit4edd2a526920c4c082e84a436de3b7ee8b9117b4 (patch)
tree6c20fc5cb19c6924cf7d3d8d0c5ef265a5a7efcb
parentbe40bdbad7f2ca2cf980f89a541336111c3c29de (diff)
merges r25402,r25404,r25405,r25406 and r25407 from trunk into ruby_1_9_1.
-- * parse.y (parser_here_document): dispatch delayed heredoc contents. based on a patch from Andy Keep in [ruby-core:24855]. -- * parse.y (mlhs_basic): fixed handling splat in middle of mlhs. a patch from Andy Keep in [ruby-core:26163] -- * parse.y (method_call): dispatch symbols. a patch from Andy Keep in [ruby-core:26169]. [ruby-core:26165] -- * test/ripper/test_*.rb: fixed indent. -- * parse.y (ripper_intern): enable literal optimization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog13
-rw-r--r--parse.y8
-rw-r--r--test/ripper/test_files.rb16
-rw-r--r--test/ripper/test_filter.rb13
-rw-r--r--test/ripper/test_parser_events.rb15
-rw-r--r--test/ripper/test_scanner_events.rb13
-rw-r--r--version.h2
7 files changed, 41 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index d66eacd296..67a99e0ddc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Oct 20 15:38:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (ripper_intern): enable literal optimization.
+
+ * parse.y (method_call): dispatch symbols. a patch from Andy Keep in
+ [ruby-core:26169]. [ruby-core:26165]
+
+ * parse.y (mlhs_basic): fixed handling splat in middle of mlhs. a
+ patch from Andy Keep in [ruby-core:26163]
+
+ * parse.y (parser_here_document): dispatch delayed heredoc
+ contents. based on a patch from Andy Keep in [ruby-core:24855].
+
Sat Jan 30 18:09:36 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* vm_method.c (rb_alias): treats an alias as if it is a newly defined
diff --git a/parse.y b/parse.y
index 15a3b787e5..0d66fcfac3 100644
--- a/parse.y
+++ b/parse.y
@@ -515,7 +515,7 @@ static VALUE ripper_dispatch5(struct parser_params*,ID,VALUE,VALUE,VALUE,VALUE,V
#define yyparse ripper_yyparse
-static VALUE ripper_intern(const char*);
+#define ripper_intern(s) ID2SYM(rb_intern(s))
static VALUE ripper_id2sym(ID);
#ifdef __GNUC__
#define ripper_id2sym(id) ((id) < 256 && rb_ispunct(id) ? \
@@ -10205,12 +10205,6 @@ ripper_id2sym(ID id)
return ID2SYM(rb_intern(name));
}
-static VALUE
-ripper_intern(const char *s)
-{
- return ID2SYM(rb_intern(s));
-}
-
static ID
ripper_get_id(VALUE v)
{
diff --git a/test/ripper/test_files.rb b/test/ripper/test_files.rb
index c2d7a50a3f..589717df55 100644
--- a/test/ripper/test_files.rb
+++ b/test/ripper/test_files.rb
@@ -1,8 +1,10 @@
begin
-
-require 'ripper'
-require 'find'
-require 'test/unit'
+ require 'ripper'
+ require 'find'
+ require 'test/unit'
+ ripper_test = true
+rescue LoadError
+end
class TestRipper_Generic < Test::Unit::TestCase
SRCDIR = File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))
@@ -18,8 +20,4 @@ class TestRipper_Generic < Test::Unit::TestCase
assert_nothing_raised("ripper failed to parse: #{n.inspect}") { Parser.new(File.read(n)).parse }
}
end
-end
-
-rescue LoadError
-end
-
+end if ripper_test
diff --git a/test/ripper/test_filter.rb b/test/ripper/test_filter.rb
index 4e9ee88dd8..d7e9ba0dcc 100644
--- a/test/ripper/test_filter.rb
+++ b/test/ripper/test_filter.rb
@@ -1,7 +1,9 @@
begin
-
-require 'ripper'
-require 'test/unit'
+ require 'ripper'
+ require 'test/unit'
+ ripper_test = true
+rescue LoadError
+end
class TestRipper_Filter < Test::Unit::TestCase
@@ -48,7 +50,4 @@ class TestRipper_Filter < Test::Unit::TestCase
Filter.new(File.read(filename)).parse(data)
assert_equal("begin", data[:token])
end
-end
-
-rescue LoadError
-end
+end if ripper_test
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 6ca81d3f09..6b37ff4da9 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -1,8 +1,10 @@
begin
-
-require_relative 'dummyparser'
-require_relative '../ruby/envutil'
-require 'test/unit'
+ require_relative 'dummyparser'
+ require_relative '../ruby/envutil'
+ require 'test/unit'
+ ripper_test = true
+rescue LoadError
+end
class TestRipper_ParserEvents < Test::Unit::TestCase
@@ -624,7 +626,4 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
["[fcall(proc,[],&block([],[void()]))]"], [], '[ruby-dev:39423]')
end
end
-end
-
-rescue LoadError
-end
+end if ripper_test
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 10f185e79b..ca254cbed5 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -2,9 +2,11 @@
# test_scanner_events.rb
#
begin
-
-require 'ripper'
-require 'test/unit'
+ require 'ripper'
+ require 'test/unit'
+ ripper_test = true
+rescue LoadError
+end
class TestRipper_ScannerEvents < Test::Unit::TestCase
@@ -806,7 +808,4 @@ class TestRipper_ScannerEvents < Test::Unit::TestCase
def test_tlambda_arg
end
-end
-
-rescue LoadError
-end
+end if ripper_test
diff --git a/version.h b/version.h
index cf43f5b892..9fb6f7cba8 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 401
+#define RUBY_PATCHLEVEL 402
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1