Forum: JRuby Kernel#__method__

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B63501aa235ec0a016402b3d78543088?d=identicon&s=25 Andrea Fazzi (remogatto)
on 2009-05-20 00:05
(Received via mailing list)
Hi all,

it seems that Kernel#__method__ is not implemented in jruby.

irb(main):001:0> __method__
NameError: undefined local variable or method `__method__' for
main:Object

Am I missing something?

Thanks.
Andrea



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
4d5b5dd4e263d780a5dfe7ac8b8ac98c?d=identicon&s=25 Tim Pease (Guest)
on 2009-05-20 00:12
(Received via mailing list)
On Tue, May 19, 2009 at 4:05 PM, Andrea Fazzi <andrea.fazzi@alcacoop.it>
wrote:
> Hi all,
>
> it seems that Kernel#__method__ is not implemented in jruby.
>
> irb(main):001:0> __method__
> NameError: undefined local variable or method `__method__' for main:Object
>
> Am I missing something?
>

__method__ is a feature from Ruby 1.9

You'll need to run JRuby in 1.9 compatible mode. It defaults to Ruby 1.8
syntax.

-> jruby --1.9 -S irb
irb(main):001:0> __method__
=> :irb_binding
irb(main:002:0>

Blessings,
TwP

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
B63501aa235ec0a016402b3d78543088?d=identicon&s=25 Andrea Fazzi (remogatto)
on 2009-05-20 00:24
(Received via mailing list)
Il giorno mar, 19/05/2009 alle 16.11 -0600, Tim Pease ha scritto:
> __method__ is a feature from Ruby 1.9

Hi Tim,

it seems that the feature is present since 1.8.7:

andrea@ganimoide:~/src$ ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
andrea@ganimoide:~/src/johnson-ffi-stable$ irb
>> __method__
=> :irb_binding

Andrea



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Cec345a59245af9d06e4438a413f4eb5?d=identicon&s=25 Shot (Piotr Szotkowski) (Guest)
on 2009-05-20 02:24
(Received via mailing list)
Andrea Fazzi:

> Il giorno mar, 19/05/2009 alle 16.11 -0600, Tim Pease ha scritto:

>> __method__ is a feature from Ruby 1.9

> it seems that the feature is present since 1.8.7:

> andrea@ganimoide:~/src$ ruby --version
> ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
> andrea@ganimoide:~/src/johnson-ffi-stable$ irb
> >> __method__
> => :irb_binding

As far as I understand, JRuby is striving for 1.8.6 (and 1.9)
compatibility and skips 1.8.7 altogether (at least for now).

— Shot
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-05-20 05:03
(Received via mailing list)
Shot (Piotr Szotkowski) wrote:
> As far as I understand, JRuby is striving for 1.8.6 (and 1.9)
> compatibility and skips 1.8.7 altogether (at least for now).

I think we're going to flip the switch on 1.8.7 for JRuby 1.4, since
most of it is there (because of 1.9 support) and we're getting more and
more people asking about those missing features.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.