Hi Joshua,

Here is a quick answer to your questions. 1.should == 2 results in this error.
  Expected 1
   to equal 2
So the first line is actually the answer returned by the implementation, and 
the second line is what was expected by the spec author. So you are reading the 
result the wrong way. Hope this helps drill into the strftime issue...

About NaN and Inf, you will see "not_compliant_on :rubinius, :jruby do" around 
the test case. So the different implementations already have different 
implementations. We will need to think of whether IronRuby should try to follow 
MRI 1.8.6 or if its OK to differ. I would look at other issues for now...

Thanks for your interest in contributing! Do go through all the information in 
http://wiki.github.com/ironruby/ironruby and http://rubyspec.org/wiki/rubyspec/ 
to help you get up and running quickly, and feel free to ask any questions you 
might have.

From: [email protected] 
[mailto:[email protected]] On Behalf Of Joshua Ball
Sent: Friday, May 29, 2009 4:41 PM
To: [email protected]
Subject: [Ironruby-core] fixing core/time/asctime

Hi all,
I am new to Ruby and IronRuby as well, but I would like to help if I can.
Last week, I submitted a request for ssiadmin, but haven't heard back yet.

Meanwhile, I am trying to find some low hanging fruit.
I found a test in rspec that is failing, namely:

Time#asctime returns a canonical string representation of time FAILED
Expected "Fri May 29 13:44:16 2009"
 to equal ""

It looks like the underlying spec was mistyped:
It currently reads:
    t.send(@method).should == t.strftime("%a %b %e %H:%M:%S %Y")
but I believe should read:
    t.send(@method).should == t.strftime("%a %b %d %H:%M:%S %Y")

Of course, it isn't quite as easy as that. I tried the above string on 1.86 and 
received the following:
irb(main):005:0> t.strftime("%a %b %e %H:%M:%S %Y")
=> ""

However, IronRuby puts out:
>>> Time.now.strftime("%a %b %e %H:%M:%S %Y")
=> "Fri May e 14:00:42 2009"

So, we have two issues here, and this leads me to one more issue. The error 
that rspec out puts:

Time#asctime returns a canonical string representation of time FAILED
Expected "Fri May 29 13:44:16 2009"
 to equal ""

This error would suggest to me that the constant of what SHOULD happen is 
Expected "Fri May 29 13:44:16 2009", but what actually is happen in IronRuby 
was the empty string, "".

In reality, IronRuby is putting out the formatted String, and I think what 
should happen is the NULL string. Is this just backwards, or is this just an 
artifact of the dispatch from one test to another.

Thanks for the help.
joshua

PS
I also noticed a number of tests that were 'gig'ing IronRuby for capitalization 
issues like:
String#% supports float formats using %E, and upcases Inf, -Inf, and NaN FAILED
Expected "Inf"
 to equal "INF"

How are you all going to handle that? Is that an rspec issue or an IronRuby 
issue?

_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to