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

merges r24323 from trunk into ruby_1_9_1.

--
* compile.c (iseq_compile_each): fix stack consistency error.
  [ruby-core:24611]

* bootstraptest/test_method.rb: add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-08-08 10:56:25 +00:00
parent 66b90d0f5c
commit 23cc3c2b87
4 changed files with 20 additions and 7 deletions

View file

@ -1,3 +1,10 @@
Thu Jul 30 21:39:42 2009 Yusuke Endoh <mame@tsg.ne.jp>
* compile.c (iseq_compile_each): fix stack consistency error.
[ruby-core:24611]
* bootstraptest/test_method.rb: add tests for above.
Thu Jul 30 16:45:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* insns.def (defineclass): preserve encoding of class/module

View file

@ -1151,3 +1151,13 @@ assert_normal_exit %q{
e.message == "undefined method `lalala!' for \"a\":String" ? :ok : :ng
end
}, '[ruby-core:22298]'
assert_equal 'ok', %q{
"hello"[0] ||= "H"
"ok"
}
assert_equal 'ok', %q{
"hello"[0, 1] ||= "H"
"ok"
}

View file

@ -3804,12 +3804,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
ADD_INSNL(ret, nd_line(node), jump, lfin);
ADD_LABEL(ret, label);
if (id == 0 || id == 1) { /* 0: or, 1: and */
ADD_INSN(ret, nd_line(node), swap);
ADD_INSN(ret, nd_line(node), pop);
ADD_INSN(ret, nd_line(node), swap);
ADD_INSN(ret, nd_line(node), pop);
}
ADD_INSN1(ret, nd_line(node), setn, INT2FIX(FIX2INT(argc) + 1));
ADD_INSN1(ret, nd_line(node), adjuststack, INT2FIX(FIX2INT(argc) + 1));
ADD_LABEL(ret, lfin);
}
else {

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
#define RUBY_PATCHLEVEL 256
#define RUBY_PATCHLEVEL 257
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1