1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Better warning message for implicit strings with line number and character offset.

This commit is contained in:
Chris Eppstein 2008-12-09 13:28:56 -08:00
parent e32b76746e
commit 6193c96a65
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ RUBY
return paren unless name = try_tok(:ident)
# An identifier without arguments is just a string
unless try_tok(:lparen)
warn %Q{WARNING: Implicit strings are deprecated. '#{name.value}' was not quoted. Please add double quotes. E.g. "#{name.value}".}
warn %Q{WARNING: Implicit strings are deprecated. '#{name.value}' found at line #{name.line}, character #{name.offset} was not quoted. Please add double quotes. E.g. "#{name.value}".}
Script::String.new(name.value)
else
args = arglist || []

View file

@ -719,7 +719,7 @@ SASS
end
def test_inaccessible_functions
assert_warning %Q{WARNING: Implicit strings are deprecated. 'to_s' was not quoted. Please add double quotes. E.g. \"to_s\".} do
assert_warning %Q{WARNING: Implicit strings are deprecated. 'to_s' found at line 2, character 11 was not quoted. Please add double quotes. E.g. \"to_s\".} do
assert_equal("a {\n b: send(to_s); }\n", render("a\n b = send(to_s)"))
end
assert_equal("a {\n b: public_instance_methods(); }\n", render("a\n b = public_instance_methods()"))