We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5be818 commit 79b8706Copy full SHA for 79b8706
1 file changed
lib/typeprof/code_range.rb
@@ -61,10 +61,8 @@ def self.from_node(node, encoding = Encoding::UTF_16LE)
61
pos1 = CodePosition.new(node.start_line, node.start_code_units_column(encoding))
62
pos2 = CodePosition.new(node.end_line, node.end_code_units_column(encoding))
63
elsif node.is_a?(RBS::Location)
64
- row, col = node.start_loc
65
- pos1 = CodePosition.new(row, col) # TODO: use SPLAT
66
- row, col = node.end_loc
67
- pos2 = CodePosition.new(row, col)
+ pos1 = CodePosition.new(*node.start_loc)
+ pos2 = CodePosition.new(*node.end_loc)
68
else
69
p node.class.ancestors
70
raise "unknown type: #{ node.class }"
0 commit comments