Skip to content

Commit 63666c9

Browse files
authored
fix: register float type lazily (#77)
1 parent d1e38e5 commit 63666c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gems/codetracer-pure-ruby-recorder/lib/recorder.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ def initialize
150150
@bool_type_index = load_type_id(BOOL, "Bool")
151151
@symbol_type_index = load_type_id(STRING, "Symbol")
152152
@no_type_index = load_type_id(ERROR, "No type")
153-
@float_type_index = load_type_id(FLOAT, "Float")
154153
end
155154

156155
def load_flow(path, line, binding)
@@ -305,7 +304,8 @@ def int_value(i)
305304
end
306305

307306
def float_value(f)
308-
ValueRecord.new(kind: 'Float', type_id: @float_type_index, f: f)
307+
ti = load_type_id(FLOAT, 'Float')
308+
ValueRecord.new(kind: 'Float', type_id: ti, f: f)
309309
end
310310

311311
def string_value(text)

0 commit comments

Comments
 (0)