Strange Proc#call problems with profile

Hello all.

I’ve striked with some strange problem.
After transition from ruby1.8.2 => ruby1.9 I have the following problem:


require ‘profile’

l = lambda{|x| x}
l.call([1,2,3]) #<== error goes here

test_profile.rb:4:in `Proc#call’: wrong argument type nil (expected
Data)
(TypeError)

If I comment out “require profile”, all works without errors.

What does it mean?

Thanks.

Victor.

On Sat, May 06, 2006 at 01:01:03PM +0900, Victor S. wrote:

(TypeError)

If I comment out “require profile”, all works without errors.

Looks like a bug in 1.9; I’m forwarding that to ruby-core:

$ cat bug2.rb
set_trace_func proc{}
l = lambda{}
l.call
$ ruby19 bug2.rb
bug2.rb:3: [BUG] Segmentation fault
ruby 1.9.0 (2006-05-01) [i686-linux]

Aborted


set_trace_func proc{}
l = lambda{}
l.call
$ ruby19 bug2.rb
bug2.rb:3: [BUG] Segmentation fault
ruby 1.9.0 (2006-05-01) [i686-linux]

Aborted

Aha. Thanks.
Can someone advice me on temporary workaround?

Mauricio F. - http://eigenclass.org - singular Ruby

Victor.

In message “Re: Strange Proc#call problems with profile”
on Sun, 7 May 2006 14:47:22 +0900, “Victor S.”
[email protected] writes:

|> Looks like a bug in 1.9; I’m forwarding that to ruby-core:

|Aha. Thanks.
|Can someone advice me on temporary workaround?

[ruby-core:07835]

— eval.c 23 Feb 2006 04:24:39 -0000 1.890
+++ eval.c 6 May 2006 14:41:49 -0000
@@ -8266,3 +8243,3 @@ proc_invoke(VALUE proc, VALUE args /* OK
struct BLOCK _block;

  • struct BLOCK *data;
  • struct BLOCK data, old_block;
    volatile VALUE result = Qundef;
    @@ -8304,2 +8277,3 @@ proc_invoke(VALUE proc, VALUE args /
    OK
    /
    modify current frame */
  • old_block = ruby_frame->block;
    ruby_frame->block = &_block;
    @@ -8316,2 +8290,3 @@ proc_invoke(VALUE proc, VALUE args /* OK
    POP_TAG();
  • ruby_frame->block = old_block;
    ruby_wrapper = old_wrapper;

|> Looks like a bug in 1.9; I’m forwarding that to ruby-core:

|Aha. Thanks.
|Can someone advice me on temporary workaround?

[ruby-core:07835]

— eval.c 23 Feb 2006 04:24:39 -0000 1.890
+++ eval.c 6 May 2006 14:41:49 -0000

Thanks matz! Big thanks!

Victor.