Skip to content

Commit

Permalink
Showing 10 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/_dump_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:Time#_dump dumps like MRI's marshaled time format
fails:Time#_dump preserves the GMT flag
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/time/_load_tags.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
fails:Time._load loads a time object in the new format
fails:Time._load loads MRI's marshaled time format
fails:Time._load treats the data as binary data
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/time/at_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
fails:Time.at passed Numeric returns a subclass instance on a Time subclass
fails:Time.at passed Time returns a non-UTC time if the argument is non-UTC
fails:Time.at passed Time returns a subclass instance
fails:Time.at passed Numeric returns a non-UTC Time
fails:Time.at passed [Integer, Numeric] returns a Time object representing the given number of seconds and Float microseconds since 1970-01-01 00:00:00 UTC
2 changes: 0 additions & 2 deletions spec/truffle/tags/core/time/comparison_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
fails:Time#<=> returns 1 if the first argument is a point in time after the second argument
fails:Time#<=> returns -1 if the first argument is a point in time before the second argument
fails:Time#<=> returns 1 if the first argument is a fraction of a microsecond after the second argument
fails:Time#<=> returns -1 if the first argument is a fraction of a microsecond before the second argument
fails(Joda Time behavior):Time#<=> returns 1 if the first argument is a point in time after the second argument (down to a microsecond)
1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/dup_tags.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
fails:Time#dup returns an independent Time object
fails:Time#dup returns a subclass instance
1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/gmt_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/minus_tags.txt
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ fails:Time#- tracks nanoseconds
fails:Time#- maintains microseconds precision
fails:Time#- maintains nanoseconds precision
fails:Time#- maintains subseconds precision
fails:Time#- returns a non-UTC time if self is non-UTC
fails:Time#- returns a time with the same fixed offset as self
fails:Time#- returns a time with nanoseconds precision between two time objects
fails:Time#- maintains precision
1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/plus_tags.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
fails:Time#+ adds a negative Float
fails:Time#+ returns a non-UTC time if self is non-UTC
fails:Time#+ returns a time with the same fixed offset as self
fails:Time#+ tracks microseconds
fails:Time#+ tracks nanoseconds
1 change: 0 additions & 1 deletion spec/truffle/tags/core/time/utc_tags.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
fails:Time#utc? returns true if time represents a time in UTC (GMT)
fails:Time.utc handles microseconds
fails:Time.utc handles fractional microseconds as a Float
fails:Time.utc handles fractional microseconds as a Rational
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.UTF8Encoding;
import org.joda.time.DateTimeZone;
import org.jruby.RubyString;
import org.jruby.truffle.nodes.RubyGuards;
import org.jruby.truffle.nodes.RubyNode;
@@ -46,7 +47,8 @@ public Object execute(VirtualFrame frame) {
// TODO CS 4-May-15 not sure how TZ ends up being nil

if (tz == nil()) {
return Layouts.STRING.createString(getContext().getCoreLibrary().getStringFactory(), RubyString.encodeBytelist("UTC", UTF8Encoding.INSTANCE), StringSupport.CR_UNKNOWN, null);
final String zone = DateTimeZone.getDefault().toString();
return Layouts.STRING.createString(getContext().getCoreLibrary().getStringFactory(), RubyString.encodeBytelist(zone, UTF8Encoding.INSTANCE), StringSupport.CR_UNKNOWN, null);
} else if (RubyGuards.isRubyString(tz)) {
return tz;
} else {

0 comments on commit 58c5732

Please sign in to comment.