diff --git a/spec/interpreter_std_spec.cr b/spec/interpreter_std_spec.cr index 6ca5aeac2ea3..3cdcc55cbd61 100644 --- a/spec/interpreter_std_spec.cr +++ b/spec/interpreter_std_spec.cr @@ -77,8 +77,9 @@ require "./std/file/tempfile_spec.cr" require "./std/file_utils_spec.cr" require "./std/float_printer/diy_fp_spec.cr" require "./std/float_printer/grisu3_spec.cr" +require "./std/float_printer/hexfloat_spec.cr" require "./std/float_printer/ieee_spec.cr" -require "./std/float_printer_spec.cr" +require "./std/float_printer/shortest_spec.cr" require "./std/float_spec.cr" require "./std/gc_spec.cr" require "./std/hash_spec.cr" diff --git a/src/float/printer/hexfloat.cr b/src/float/printer/hexfloat.cr index 88f64b34b358..1081211141c0 100644 --- a/src/float/printer/hexfloat.cr +++ b/src/float/printer/hexfloat.cr @@ -12,7 +12,6 @@ module Float::Printer::Hexfloat(F, U) # hexSequence = /#{sign}?#{hexIndicator}#{hexSignificand}#{decExponent}/ # = /[+−]?0[Xx](?:[0-9A-Fa-f]*\.[0-9A-Fa-f]+|[0-9A-Fa-f]+\.?)[Pp][+−]?[0-9]+/ # ``` - @[AlwaysInline] def self.to_f(str : String, &) ptr = str.to_unsafe finish = ptr + str.bytesize