Skip to content

Binding#receiver is not implemented [9k] [lotus] #2578

@PragTob

Description

@PragTob

Binding#receiver is not implemented

My jruby-head is from today: tobi@tobi-desktop ~/github/lotus_components/helpers $ ruby -v jruby 9.0.0.0-SNAPSHOT (2.2.0p0) 2015-02-08 cc00fd4 OpenJDK 64-Bit Server VM 24.75-b04 on 1.7.0_75-b13 +jit [linux-amd64]

Here is a demonstration of what does not work:

ruby 2.2.0:

2.2.0 :001 > blk = proc do puts 'Test' end
 => #<Proc:0x00000000bac070@(irb):1> 
2.2.0 :002 > blk.binding
 => #<Binding:0x00000000ba8d30> 
2.2.0 :003 > blk.binding.receiver
 => main 

jruby-head:

jruby-head :001 > blk = proc do puts 'test' end
 => #<Proc:0x31dec40@(irb):1> 
jruby-head :002 > blk.binding
 => #<Binding:0x41f6e11e> 
jruby-head :004 > blk.binding.receiver
NoMethodError: undefined method `receiver' for #<Binding:0x25c2dc76>
    from (irb):4:in `evaluate'
    from org/jruby/RubyKernel.java:1000:in `eval'
    from org/jruby/RubyKernel.java:1310:in `loop'
    from org/jruby/RubyKernel.java:1120:in `catch'
    from org/jruby/RubyKernel.java:1120:in `catch'
    from /home/tobi/.rvm/rubies/jruby-head/bin/irb:13:in `__script__'

Discovered during testing of lotus/helpers

Tobi

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions