[#23132] [Bug #1357] Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers — Ollivier Robert <redmine@...>
Bug #1357: Fixing variables into specific CPU registers deemed overrated & may disturb compilers' optimizers
[#23154] [Bug #1363] Wrong value for Hash of NaN — Heesob Park <redmine@...>
Bug #1363: Wrong value for Hash of NaN
Hi,
Hi,
Yukihiro Matsumoto wrote:
[#23168] [Bug #1367] flatten(0) is not consistent with flatten(), flatten(1), etc. — Paul Lewis <redmine@...>
Bug #1367: flatten(0) is not consistent with flatten(), flatten(1), etc.
Issue #1367 has been updated by Paul Lewis.
[#23174] [Feature #1371] FTPS Implicit — Daniel Parker <redmine@...>
Feature #1371: FTPS Implicit
[#23193] Regexp Encoding — James Gray <james@...>
I'm trying to document the Encoding Regexp objects receive for the
[#23194] [Feature #1377] Please provide constant File::NOATIME — Johan Walles <redmine@...>
Feature #1377: Please provide constant File::NOATIME
[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>
Dear Ruby developers and users!
Wolfgang N叩dasi-Donner wrote:
Wolfgang N叩dasi-Donner wrote:
Michael Neumann schrieb:
[#23252] [Bug #1392] Object#extend leaks memory on Ruby 1.9.1 — Muhammad Ali <redmine@...>
Bug #1392: Object#extend leaks memory on Ruby 1.9.1
[#23267] StringIO: RubySpec violation — Hongli Lai <hongli@...99.net>
I ran RubySpec against the 1.8.6-p368 release. It seems that
[#23289] [Bug #1399] Segmentation fault is raised when you use a postgres gem — Marcel Keil <redmine@...>
Bug #1399: Segmentation fault is raised when you use a postgres gem
[#23297] Ruby Oniguruma question — Ralf Junker <ralfjunker@...>
I see that the Ruby source code contains modified and more recent version of the Oniguruma regular expression library.
[#23305] [Bug #1403] Process.daemon should do a double fork to avoid problems with controlling terminals — Gary Wright <redmine@...>
Bug #1403: Process.daemon should do a double fork to avoid problems with controlling terminals
Hi,
[#23311] [Bug #1404] Net::HTTP::Post failing when a post field contains ":" — Ignacio Martín <redmine@...>
Bug #1404: Net::HTTP::Post failing when a post field contains ":"
[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>
Feature #1408: 0.1.to_r not equal to (1/10)
Issue #1408 has been updated by tadayoshi funaba.
Hi,
Hi.
Issue #1408 has been updated by Marc-Andre Lafortune.
Issue #1408 has been updated by Roger Pack.
[#23321] [Bug #1412] 1.8.7-p160 extmk.rb fails when cross compiling — Luis Lavena <redmine@...>
Bug #1412: 1.8.7-p160 extmk.rb fails when cross compiling
[ruby-core:23147] Re: Running ruby1.9 bytecode
Hi James,
> I just found out about the VM::InstructionSequence.compile method for
> turning Ruby code strings into ruby1.9 bytecode. Is there a standard method
> of de/serializing this bytecode to/from files, and is there a way of running
> bytecode directly? I'm looking at generating bytecode from another language
> to get it to run on Ruby.
>
You can at least load bytecode directly, transform ruby to bytecode and at
the end evaluate everything:
1
2
3
4
5
6
7
8
9
*10*
11
12
13
14
15
16
17
18
19
*20*
iseqFromCode = RubyVM::InstructionSequence.new "a = 1; a += a; puts a"
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseqFromCode.eval
# 2
# => nil
iseqRawArr = iseqFromCode.to_a
# => ["YARVInstructionSequence/SimpleDataFormat", 1, 1, 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2}, "<compiled>",
# "<compiled>", :top, [:a], 0, [], [1, [:trace, 1],
# [:putobject, 1], [:setlocal, 2], [:trace, 1], [:getlocal, 2],
# [:getlocal, 2], [:opt_plus], [:setlocal, 2], [:trace, 1],
# [:putnil], [:getlocal, 2], [:send, :puts, 1, nil, 8, nil],
# [:leave]]]
iseqRawArr.class
# => Array
iseqFromArr = RubyVM::InstructionSequence.load iseqRawArr
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseqFromArr.eval
# 2
# => nil
But for this you have to apply this to the source code:
1
2
3
4
5
6
7
8
9
*10*
11
12
13
14
15
boviAir:src danielbovensiepen$ svn diff iseq.c
Index: iseq.c
===================================================================
--- iseq.c (revision 21348)
+++ iseq.c (working copy)
@@ -1451,7 +1451,7 @@
rb_define_method(rb_cISeq, "eval", iseq_eval, 0);
/* disable this feature because there is no verifier. */
- /* rb_define_singleton_method(rb_cISeq, "load", iseq_s_load, -1); */
+ rb_define_singleton_method(rb_cISeq, "load", iseq_s_load, -1);
(void)iseq_s_load;
rb_define_singleton_method(rb_cISeq, "compile", iseq_s_compile, -1);
boviAir:src danielbovensiepen$
Of course, the comments are very clear: you shouldn't do this!
MfG
Daniel