[#66678] [ruby-trunk - Feature #10481] Add "if" and "unless" clauses to rescue statements — alex@...
Issue #10481 has been updated by Alex Boyd.
3 messages
2014/12/04
[#66762] Re: [ruby-changes:36667] normal:r48748 (trunk): struct: avoid all O(n) behavior on access — Tanaka Akira <akr@...>
2014-12-10 0:44 GMT+09:00 normal <ko1@atdot.net>:
3 messages
2014/12/10
[#66851] [ruby-trunk - Feature #10585] struct: speedup struct.attr = v for first 10 attributes and struct[:attr] for big structs — funny.falcon@...
Issue #10585 has been updated by Yura Sokolov.
3 messages
2014/12/15
[#67126] Ruby 2.2.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 2.2.0.
8 messages
2014/12/25
[#67128] Re: Ruby 2.2.0 Released
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2014/12/25
I can't install it in any of our Ubuntu servers using rbenv:
[#67129] Re: Ruby 2.2.0 Released
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/12/25
> I can't install it in any of our Ubuntu servers using rbenv:
[ruby-core:66634] [ruby-trunk - Feature #8543] rb_iseq_load
From:
normalperson@...
Date:
2014-12-01 22:38:40 UTC
List:
ruby-core #66634
Issue #8543 has been updated by Eric Wong.
s.wanabe@gmail.com wrote:
> iseq_data_to_ary() ignores hidden variables named by id_internal().
>
> It seems to be mismatched for the variable that recieving keyword arguments, for aforementioned reason.
> How about push rb_uint_new(lid) when rb_id2str(lid) is false?
Thank you! Committed as r48678. That seems to fix the
def x(a, (b, *c), d: false); end
case for me, now #to_a seems to to not be idempotent and segfaults,
investigating.
----------------------------------------
Feature #8543: rb_iseq_load
https://bugs.ruby-lang.org/issues/8543#change-50248
* Author: Alexey Voskov
* Status: Open
* Priority: Low
* Assignee: Koichi Sasada
* Category: YARV
* Target version: current: 2.2.0
----------------------------------------
I noticed an unusual behaviour of undocumented rb_iseq_load function.
Its work differs in different Ruby versions. I'm trying to protect some Ruby
source code by its conversion to YARV p-code and using the next strategy:
1. Convert code to array
~~~ruby
data = RubyVM::InstructionSequence.compile_file('hello.rb').to_a
~~~
2. Pass a compiled source to the rb_iseq_load function and evaluate it
~~~ruby
iseq = iseq_load.(data)
iseq.eval
~~~
Sample programs are supplied in the attachments.
"hello.rb"
```ruby
puts "tralivali"
def funct(a,b)
a**b
end
3.times { |i|
puts "Hello, world#{funct(2,i)}!"
}
```
The differences
Ruby 1.9.3 (ruby 1.9.3p194 (2012-04-20) [i386-mingw32])
Correct work. Output:
```
tralivali
Hello, world1!
Hello, world2!
Hello, world4!
```
Ruby 2.0.0 (ruby 2.0.0p193 (2013-05-14) [x64-mingw32])
Incorrect work (omits the code inside code blocks). Output
```
tralivali
```
Attempts of loading bigger programs by means of rb_iseq_load in Ruby 2.0.0 usually ends with a segmentation fault.
Such behaviour also can be reproduced by means of iseq Ruby extension ("for iseq freaks")
https://github.com/wanabe/iseq
P.S. I understand that it is an undocumented feature.
---Files--------------------------------
hello.rb (102 Bytes)
rb_pack.rb (931 Bytes)
iseq-load-test3.rb (210 Bytes)
iseq-load-test3-file.rb (369 Bytes)
please-fix-rb_iseq_load-thank-you.pdf (444 KB)
--
https://bugs.ruby-lang.org/