Is Enumerable#feed only available in MRI?

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#method-i-feed

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

Andrew V.

On 03/21/2014 05:09 PM, Andrew V. wrote:

NoMethodError:
Andrew V.
Seems weird. I think this is just an overlooked method. I would file
bugs.

https://github.com/jruby/jruby/search?q=enumerator+feed&type=Code

-Justin

2014-03-22 16:01 GMT+09:00 Matthew K. [email protected]:

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.

On Mar 22, 2014 10:10 AM, “Andrew V.” [email protected] 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#method-i-feed

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

Andrew V.

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 :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs