Re: RubySpecs

On Oct 30, 2011 12:34 AM, “Hirotsugu A.” [email protected]

Hi, Matt,

It seems to me that this issue should be best raised on RubySpecs list.



OK. I will post it there. I hope the list is more active than the
discussion list dates would suggest.


On Oct 29, 2011, at 3:12 PM, Matt Wilbur wrote:


Here comes stupid question time. I’ve been trying to learn JRuby, got
stuck on learning the monkeybars GUI because of a failure to load
So, I thought I’d roll up my sleeves and try to pitch in to make some
RubySpecs pass. I thought I’d start with a simple-looking failing spec.
The problem is, I don’t understand the rationale, and was wondering if
anyone could give me a hand. Here it is:

it "calls #to_s on arguments that are neither Strings nor Encodings"


Can anyone explain? I’ve looked at the C implementation, and the only
reason I see to_str being called twice is first, to convert to a string
make sure that the encoding is ASCII-compatible, and then a second time
get a string used to look up the encoding. As far as I can tell this is
implementation detail, and the JRuby implementation doesn’t need the
call because it just uses the same string object for both the ASCII
and the actual encoding lookup. Perhaps I’m missing something…

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