File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
truffle/src/main/java/org/jruby/truffle/nodes/core Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,14 @@ public InternalOffsetNode(InternalOffsetNode prev) {
66
66
}
67
67
68
68
@ Specialization
69
- public RubyNilClass internalOffset (RubyTime time ) {
70
- return getContext ().getCoreLibrary ().getNilObject ();
69
+ public Object internalOffset (RubyTime time ) {
70
+ final Object offset = time .getOffset ();
71
+
72
+ if (offset == null ) {
73
+ return getContext ().getCoreLibrary ().getNilObject ();
74
+ } else {
75
+ return offset ;
76
+ }
71
77
}
72
78
}
73
79
@@ -83,8 +89,9 @@ public InternalSetOffsetNode(InternalSetOffsetNode prev) {
83
89
}
84
90
85
91
@ Specialization
86
- public boolean internalSetGMT (RubyTime time , Object setOffset ) {
87
- throw new UnsupportedOperationException ("_set_offset " + setOffset .getClass ());
92
+ public Object internalSetOffset (RubyTime time , Object offset ) {
93
+ time .setOffset (offset );
94
+ return offset ;
88
95
}
89
96
}
90
97
You can’t perform that action at this time.
0 commit comments