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

Patch to make jbuilder work with Ruby 1.8.7 #4

Closed
wants to merge 4 commits into from

Conversation

pixeltrix
Copy link
Contributor

I know 1.9.3 is where all the hot action is at but spare a thought for us poor souls who have to deploy to REE for the next few months until I can find time to update our servers.

The Enumerable method one? behaves in a similar manner to the any?
method such that it checks if the enum has one element that is
truthy. This obviously causes problems when trying to set false/nil
values as args.one? will return false.

Although many? does behave differently to one? and any? in that it
depends on the actual number of elements in the enum its use of a
block argument causes a performance impact on Ruby 1.8.7.
@pctj101
Copy link
Contributor

pctj101 commented Dec 9, 2011

thanks dude works well

Ruby 1.8 lacks block local variables so a couple of the tests fail
because they use the same variable name inside the block.

Also a couple of tests need to be eval'd since the implicit call
syntax of Ruby 1.9 is seen as a syntax error by Ruby 1.8.
@ismasan
Copy link

ismasan commented Jan 2, 2012

Why U not merge this, DHH?

@dhh
Copy link
Member

dhh commented Jan 23, 2012

What's with the one?/many? purge? How does that relate to 1.8.7? one? is available in the std lib and active support added many?

Can you remove those? Then I can merge.

Also, if you can remove the spacing noise from the beginning of the patch.

@pixeltrix
Copy link
Contributor Author

Did you look at the commit message?

There's an argument that the behaviour of many? should be consistent with one? and any? but lets not have that argument here :-)

@pklingem
Copy link

pklingem commented Mar 1, 2012

Patrick liked this.

@pixeltrix pixeltrix closed this Mar 23, 2012
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.

5 participants