зеркало из https://github.com/github/ruby.git
* compile.c (compile_massign): fix massign compilation
(example: a, *v, (*x) = ...). [ruby-dev:31107] * bootstraptest/test_massign.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
49b0a4d5ed
Коммит
d82f3e7d5c
|
@ -1,3 +1,10 @@
|
|||
Wed Jul 4 03:43:29 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* compile.c (compile_massign): fix massign compilation
|
||||
(example: a, *v, (*x) = ...). [ruby-dev:31107]
|
||||
|
||||
* bootstraptest/test_massign.rb: add tests for above.
|
||||
|
||||
Tue Jul 3 23:12:29 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* include/ruby/onigiruma.h (ONIG_EXTERN): use RUBY_EXTERN if defined.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
assert_equal '[[1], 2, 3]', '*v1, (a, b) = [1,[2, 3]]; [v1, a, b]'
|
||||
assert_equal '[[1], 2, 3]', '*v1,(*), (a, b) = [1,:x,[2, 3]]; [v1, a, b]'
|
||||
|
||||
=begin
|
||||
# generated by this script:
|
||||
|
||||
|
|
14
compile.c
14
compile.c
|
@ -2049,12 +2049,22 @@ compile_massign(rb_iseq_t *iseq, LINK_ANCHOR *ret,
|
|||
DECL_ANCHOR(lhs);
|
||||
|
||||
COMPILE_POPED(lhs, "post", n->nd_head);
|
||||
REMOVE_ELEM(FIRST_ELEMENT(lhs));
|
||||
|
||||
if (nd_type(n->nd_head) != NODE_MASGN) {
|
||||
REMOVE_ELEM(FIRST_ELEMENT(lhs));
|
||||
}
|
||||
|
||||
ADD_SEQ(ret, lhs);
|
||||
n = n->nd_next;
|
||||
}
|
||||
|
||||
make_masgn_lhs(iseq, ret, splatn->nd_1st);
|
||||
if (splatn->nd_1st == (NODE*)(VALUE)-1) {
|
||||
/* v1, *, v2 = expr */
|
||||
ADD_INSN(ret, nd_line(splatn), pop);
|
||||
}
|
||||
else {
|
||||
make_masgn_lhs(iseq, ret, splatn->nd_1st);
|
||||
}
|
||||
}
|
||||
else {
|
||||
make_masgn_lhs(iseq, ret, splatn);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-07-03"
|
||||
#define RUBY_RELEASE_DATE "2007-07-04"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20070703
|
||||
#define RUBY_RELEASE_CODE 20070704
|
||||
#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 7
|
||||
#define RUBY_RELEASE_DAY 3
|
||||
#define RUBY_RELEASE_DAY 4
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче