Skip to content

Commit

Permalink
Fix StringBuilder#to_i
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Apr 22, 2018
1 parent 1727b21 commit 3b67c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/crystal/macros/methods.cr
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ module Crystal
end

if value
NumberLiteral.new(value)
NumberLiteral.new(value.to_s, :i32)
else
raise "StringLiteral#to_i: #{@value} is not an integer"
end
Expand Down

0 comments on commit 3b67c54

Please sign in to comment.