#683 ✓invalid
Marc-André Lafortune

hobosupport

Reported by Marc-André Lafortune | March 31st, 2010 @ 11:53 PM

Someone pointed out hobofields, looks interesting but it loads hobosupport, which messes up a lot with builtin classes.

I understand why you'd like to have some utility features in a framework like hobo, but if hobofields is to be independent, it shouldn't include hobosupport. That's just an opinion, of course.

Now hobosupport seems to have a couple of very crappy methods.

Let's take for example Enumerable#drop_while.

1) It shouldn't override the builtin one if there is one (Ruby 1.8.7+)
2) It should, like the builtin one, return an enumerator if there is no block
3) It should not rely on #[], not all Enumerable have #[]

Really, for these kind of changes, you should just require my backports gem anyways (or copy the code for the methods you need).

For the other changes to the builtin api, I'd recommend you don't use them in hobofields, if you want it to be used outside of hobo.

Comments and changes to this ticket

  • Tom Locke

    Tom Locke April 1st, 2010 @ 05:46 PM

    • State changed from “new” to “invalid”

    This is more of a discussion than a ticket, and will probably progress better on the hobo-dev list. I'll repost there.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages