Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ef6182ffe7c8
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5d40a90056eb
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Nov 14, 2014

  1. fix another joda-2.5 exception

    one exception I see only locally and the other I see only on travis - no idea why. treat both
    as RangeError on the ruby side which honors the test-case.
    mkristian committed Nov 14, 2014

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    nomadium Miguel Landaeta
    Copy the full SHA
    bd61d86 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    nomadium Miguel Landaeta
    Copy the full SHA
    5d40a90 View commit details
Showing with 10 additions and 4 deletions.
  1. +1 −0 antlib/extra.xml
  2. +8 −3 core/src/main/java/org/jruby/RubyTime.java
  3. +1 −1 test/pom.rb
1 change: 1 addition & 0 deletions antlib/extra.xml
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
<exec executable='mvn'>
<arg line='-q'/>
<arg line='-Ptest,bootstrap,main,complete'/>
<arg line='-Dmaven.test.skip'/>
</exec>
</target>
<target name='test-jruby-jars-jruby.1.9' depends='mvn'>
11 changes: 8 additions & 3 deletions core/src/main/java/org/jruby/RubyTime.java
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.IllegalFieldValueException;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.tz.FixedDateTimeZone;
@@ -1061,9 +1062,13 @@ public static IRubyObject at(ThreadContext context, IRubyObject recv, IRubyObjec
try {
time.dt = time.dt.withMillis(seconds * 1000 + millisecs);
}
// joda-time 2.5 cab throw this exception
catch( ArithmeticException e ) {
throw runtime.newRangeError(e.getMessage());
// joda-time 2.5 can throw this exception - seen locally
catch(ArithmeticException e1) {
throw runtime.newRangeError(e1.getMessage());
}
// joda-time 2.5 can throw this exception - seen on travis
catch(IllegalFieldValueException e2) {
throw runtime.newRangeError(e2.getMessage());
}
}

2 changes: 1 addition & 1 deletion test/pom.rb
Original file line number Diff line number Diff line change
@@ -145,6 +145,6 @@ def create_target( name, complete )
#TODO builder.create_target( 'mri.1.9', false )
builder.create_target( 'rubicon.1.9', true )

File.write(File.join(basedir, '..', 'antlib', 'extra.xml'), "<project basedir='..'>\n<target name='mvn'>\n<exec executable='mvn'>\n<arg line='-q'/>\n<arg line='-Ptest,bootstrap,main,complete'/>\n</exec>\n</target>\n#{builder.targets}<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='#{builder.names}'/></project>")
File.write(File.join(basedir, '..', 'antlib', 'extra.xml'), "<project basedir='..'>\n<target name='mvn'>\n<exec executable='mvn'>\n<arg line='-q'/>\n<arg line='-Ptest,bootstrap,main,complete'/>\n<arg line='-Dmaven.test.skip'/>\n</exec>\n</target>\n#{builder.targets}<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='#{builder.names}'/></project>")

end