• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revisionfb336cbd32887359574aa31bedaa5c7402906be1 (tree)
Time2020-02-09 14:11:59
Authormiyakawataku
Commitermiyakawataku

Log Message

rename INSTANT.instant? to INSTANT.is?

Change Summary

Incremental Difference

diff -r c98149e4a32c -r fb336cbd3288 src/main/resources/kink-mods/kink/datetime/INSTANT.kn
--- a/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Sun Feb 09 14:02:36 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Sun Feb 09 14:11:59 2020 +0900
@@ -100,14 +100,10 @@
100100 #
101101 # If you want to measure the elapsed machine time, use TICK.new_stopwatch. See kink/TICK.
102102 :now <- {()
103- :Java_ins = _produce_now
103+ :Java_ins = Instant_class.call_static('now' [])
104104 _new_instant_truncating(Java_ins)
105105 }
106106
107-:_produce_now <- {
108- Instant_class.call_static('now' [])
109-}
110-
111107 :_new_instant_truncating <- {(:Java_ins)
112108 :Adjusted = branch(
113109 { Java_ins.call_method('isAfter' [Max_java_ins]).to_kink_bool } { Max_java_ins }
@@ -132,5 +128,8 @@
132128 :instant? <- {(:Ins)
133129 Ins.var_syms.have_all?(Instant_syms)
134130 }
131+:is? <- {(:Ins)
132+ Ins.var_syms.have_all?(Instant_syms)
133+}
135134
136135 # vim: et sw=2 sts=2
diff -r c98149e4a32c -r fb336cbd3288 src/test/kink/datetime/INSTANT_test.kn
--- a/src/test/kink/datetime/INSTANT_test.kn Sun Feb 09 14:02:36 2020 +0900
+++ b/src/test/kink/datetime/INSTANT_test.kn Sun Feb 09 14:11:59 2020 +0900
@@ -189,14 +189,14 @@
189189
190190 # }}}1
191191
192-TEST.group('INSTANT.instant?'){
192+TEST.group('INSTANT.is?'){
193193 TEST.test('true for instant'){
194194 :Ins = INSTANT.new(12345.123_456_789)
195- INSTANT.instant?(Ins) || raise('got false')
195+ INSTANT.is?(Ins) || raise('got false')
196196 }
197197
198198 TEST.test('false for nada'){
199- INSTANT.instant?(nada) && raise('got true')
199+ INSTANT.is?(nada) && raise('got true')
200200 }
201201 }
202202
Show on old repository browser