Forum: Ruby Is Enumerable#feed only available in MRI?

F0987c97234fa9c6b26f796bdbdab037?d=identicon&s=25 Andrew Vit (Guest)
on 2014-03-22 01:09
(Received via mailing list)
Hello ruby friends,

I have a test failure that is affecting both Rubinius and JRuby, but is
good in MRI.

In JRuby 1.7.9:
NoMethodError:
   undefined method `feed' for #<Enumerator:0x1f72ccbd>

In Rubinius 2.2.6:
NoMethodError:
   undefined method `feed' on an instance of Enumerable::Enumerator.

This method is documented here, and an example of using it in an
internal iterator is shown:

http://www.ruby-doc.org/core-2.1.1/Enumerator.html...

Why does this method only exist in C Ruby? Or is it a bug in both
implementations? Is there a workaround?

Andrew Vit
6e366eb5a71be2bad7f383d42aeb4788?d=identicon&s=25 Justin Collins (Guest)
on 2014-03-22 02:18
(Received via mailing list)
On 03/21/2014 05:09 PM, Andrew Vit wrote:
> NoMethodError:
> Andrew Vit
Seems weird. I think this is just an overlooked method. I would file
bugs.

https://github.com/jruby/jruby/search?q=enumerator...

-Justin
3df767279ce7d81db0a5bb30f5136863?d=identicon&s=25 Matthew Kerwin (mattyk)
on 2014-03-22 08:02
(Received via mailing list)
On Mar 22, 2014 10:10 AM, "Andrew Vit" <andrew@avit.ca> wrote:
>
> Hello ruby friends,
>
> I have a test failure that is affecting both Rubinius and JRuby, but is
good in MRI.
>
> In JRuby 1.7.9:
> NoMethodError:
>   undefined method `feed' for #<Enumerator:0x1f72ccbd>
>
> In Rubinius 2.2.6:
> NoMethodError:
>   undefined method `feed' on an instance of Enumerable::Enumerator.
>
> This method is documented here, and an example of using it in an internal
iterator is shown:
>
> http://www.ruby-doc.org/core-2.1.1/Enumerator.html...
>
> Why does this method only exist in C Ruby? Or is it a bug in both
implementations? Is there a workaround?
>
> Andrew Vit

I don't think jruby or rubinius have caught up with ruby 2.1.1 yet.
AFAIK
jruby is still aiming for full 1.9.3 compatibility.

A bug report could help prioritise that method though, as could a pull
request ;)
B11f10c4cd9d53970e7be20caa43f940?d=identicon&s=25 Tanaka Akira (Guest)
on 2014-03-22 12:29
(Received via mailing list)
2014-03-22 16:01 GMT+09:00 Matthew Kerwin <matthew@kerwin.net.au>:
>
> I don't think jruby or rubinius have caught up with ruby 2.1.1 yet. AFAIK
> jruby is still aiming for full 1.9.3 compatibility.

Enumerator#feed is available since Ruby 1.9.2.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.