Skip to content

Commit

Permalink
Make unquote a no-op for non-strings. This keeps legacy projects from…
Browse files Browse the repository at this point in the history
… breaking now that list support exists.
  • Loading branch information
chriseppstein committed Dec 21, 2010
1 parent 992893e commit 57a9ce4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/sass/script/functions.rb
Expand Up @@ -1013,8 +1013,11 @@ def invert(color)
# unquote("foo") => foo
# unquote(foo) => foo
def unquote(string)
assert_type string, :String
Sass::Script::String.new(string.value, :identifier)
if string.is_a?(Sass::Script::String)
Sass::Script::String.new(string.value, :identifier)
else
string
end
end
declare :unquote, [:string]

Expand Down

0 comments on commit 57a9ce4

Please sign in to comment.