Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Date._parse has different arity than 1.9.3 #2241

Open
wulftone opened this Issue · 5 comments

4 participants

@wulftone

I ran into an issue with Date._parse using ruby-american_date where the arity of _parse caused some confusion. In rbx's time.rb, the arity of _parse is 3.

The confusion is from here where Jeremy is effectively replacing _parse/3 with _parse/2, which is fine for MRI, but rbx proceeds to try and call _parse/3 from the regular parse method from time.rb.

I've made a fix for it and a spec that fails without my fix, but I'm not sure if the Rubinius team cares about preserving the arity of each function in MRI...?

@kachick kachick referenced this issue from a commit in kachick/rubinius
@kachick kachick Adjust Date._parse API. Fixes #2241 1a09993
@wulftone

Thanks for that, that's better than my own solution. Is this getting merged?

@wulftone wulftone referenced this issue in jeremyevans/ruby-american_date
Closed

Fix for Rubinius 2.0 #7

@mjc
mjc commented

This has cropped up again after the rubysl changes.

@jc00ke
Owner

@wulftone mind setting up a quick little repro? Gist is fine. Thanks!

@YorickPeterse

Do we have any repro for this, and does the problem still occur to begin with?

@mjc
mjc commented

IIRC loading the american date gem and then trying to do Date.parse("01/02/2013") would trigger it.

I'm pretty sure this was fixed shortly after I commented on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.