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

Travis jruby #601

Merged
merged 3 commits into from Jan 19, 2016

Conversation

Projects
None yet
4 participants
@spk
Contributor

spk commented Jan 16, 2016

Add jruby latest stable with openjdk on travis
I just had to round a spec on currency

@semmons99

This comment has been minimized.

Member

semmons99 commented Jan 16, 2016

Why does the spec change. Seems like incorrect behavior.

@spk

This comment has been minimized.

Contributor

spk commented Jan 16, 2016

On jruby the result is 2.9999999999999996 for this spec

@semmons99

This comment has been minimized.

Member

semmons99 commented Jan 16, 2016

Sounds like a JRuby issue or a float is being used somewhere it shouldn't.

  • shane

On Jan 16, 2016, at 12:30 PM, Laurent Arnoud notifications@github.com wrote:

On jruby the result is 2.9999999999999996 for this spec


Reply to this email directly or view it on GitHub.

@printercu

This comment has been minimized.

Member

printercu commented Jan 17, 2016

Failure could take place, if exponent is Float (https://github.com/RubyMoney/money#currency-exponent). It's better to use .be_within(0.01).of(3) in spec rather then .round.

@spk

This comment has been minimized.

Contributor

spk commented Jan 18, 2016

Does everyone agree with expect(Currency.new(:iqd).exponent).to be_within(0.01).of(3) ?

@antstorm

This comment has been minimized.

Contributor

antstorm commented Jan 18, 2016

Judging by the output only 2 float exponents are MGA and MRO, but Wiki says:

Wiki

So I guess it's safe to .round the result of that method (inside the method, not test, we want consistency across different interpreters) as it should be int.

Also the description of exponent method looks completely off.

@printercu

This comment has been minimized.

Member

printercu commented Jan 19, 2016

So should we better round exponent in #exponent method?

@semmons99

This comment has been minimized.

Member

semmons99 commented Jan 19, 2016

That seems the more reasonable answer.

  • shane

On Jan 19, 2016, at 1:09 AM, printercu notifications@github.com wrote:

So should we better round exponent in #exponent method?


Reply to this email directly or view it on GitHub #601 (comment).

@spk spk force-pushed the spk:travis-jruby branch from 7b524b1 to 43f65df Jan 19, 2016

@spk spk force-pushed the spk:travis-jruby branch from 43f65df to c998b5b Jan 19, 2016

@spk spk force-pushed the spk:travis-jruby branch from c998b5b to baa0055 Jan 19, 2016

@spk

This comment has been minimized.

Contributor

spk commented Jan 19, 2016

I've update the PR accordingly to the comments and build is green, just one issue with Currency#inspect which is normal I think.

@semmons99

This comment has been minimized.

Member

semmons99 commented Jan 19, 2016

Looks good. Thanks for following through with this.

semmons99 added a commit that referenced this pull request Jan 19, 2016

@semmons99 semmons99 merged commit 2f0bc70 into RubyMoney:master Jan 19, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@spk

This comment has been minimized.

Contributor

spk commented Jan 19, 2016

\o/

@spk spk deleted the spk:travis-jruby branch Jan 19, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment