Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for safe_sort for ruby 1.9.2 because Kernel now defines <=> for Object #83

Closed
wants to merge 2 commits into from

Conversation

pvh
Copy link

@pvh pvh commented Jul 13, 2011

I made a corresponding issue with more details about the bug.

@pvh
Copy link
Author

pvh commented Jul 13, 2011

details:
ruby core issue 24063 added Kernel::<=> to Object (note that Kernel module documentation does not display this functionality).

as a result, safe_sort isn't anymore, and trying to =~ any objects that don't define a better <=> throws an exception.

i'll attach a somewhat plausible patch momentarily

@dchelimsky
Copy link
Contributor

Can you add a spec for this that fails in 1.9.2 without this change?

@dchelimsky
Copy link
Contributor

Actually, looks like #81 provides them :)

@pvh
Copy link
Author

pvh commented Jul 13, 2011

Brilliant. I'll check and see if anywhere else is checking for <=> while I'm at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants