From b285d26a16c90f8e2d491592e793c3b40545aaf1 Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 24 Aug 2007 15:19:00 +0000 Subject: [PATCH] * compile.c (compile_massign_opt): fix to skip massign optimization with global variables. * bootstraptest/test_massign.rb: add some tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ bootstraptest/test_massign.rb | 8 ++++++++ compile.c | 3 --- version.h | 6 +++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e49eba878f..e5373e3dc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Aug 25 00:08:43 2007 Koichi Sasada + + * compile.c (compile_massign_opt): fix to skip massign optimization + with global variables. + + * bootstraptest/test_massign.rb: add some tests for above. + Fri Aug 24 18:42:03 2007 Yukihiro Matsumoto * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string. diff --git a/bootstraptest/test_massign.rb b/bootstraptest/test_massign.rb index 202dbd38e5..c95c178721 100644 --- a/bootstraptest/test_massign.rb +++ b/bootstraptest/test_massign.rb @@ -4,6 +4,14 @@ assert_equal '[[1], 2, 3]', '*v1,(*), (a, b) = [1,:x,[2, 3]]; [v1, a, b]' assert_equal '[]', '*a = *nil; a' assert_equal '[nil]', '*a = nil; a' assert_equal '2', 'a, a = 1, 2; a', "[ruby-dev:31522]" +assert_equal '[1, 2]', 'a, b = 1, 2' +assert_equal '[1, 2]', %q{ + ans = [] + trace_var(:$a){|v| ans << v} + trace_var(:$b){|v| ans << v} + $a, $b = 1, 2 + ans +} =begin # generated by this script: diff --git a/compile.c b/compile.c index 2e0473a7d1..f50228d447 100644 --- a/compile.c +++ b/compile.c @@ -2032,9 +2032,6 @@ compile_massign_opt(rb_iseq_t *iseq, LINK_ANCHOR *ret, case NODE_CVASGN: MEMORY(ln->nd_vid); break; - case NODE_GASGN: - MEMORY((VALUE)ln->nd_entry); - break; default: return 0; } diff --git a/version.h b/version.h index bd82404457..b695821941 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-08-24" +#define RUBY_RELEASE_DATE "2007-08-25" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070824 +#define RUBY_RELEASE_CODE 20070825 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2007 #define RUBY_RELEASE_MONTH 8 -#define RUBY_RELEASE_DAY 24 +#define RUBY_RELEASE_DAY 25 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];