Skip to content

Commit

Permalink
Escape } in context regexes for ruby 1.8.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
bshelton229 committed Mar 11, 2013
1 parent ff940a2 commit 8511710
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/less/java_script/rhino_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def handle_js_error(e)
if e.value && ( e.value['message'] || e.value['type'].is_a?(String) )
raise Less::ParseError.new(e, e.value) # LessError
end
if e.unwrap.to_s =~ /missing closing `}`/
if e.unwrap.to_s =~ /missing closing `\}`/
raise Less::ParseError.new(e.unwrap.to_s)
end
if e.message && e.message[0, 12] == "Syntax Error"
Expand Down
2 changes: 1 addition & 1 deletion lib/less/java_script/v8_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def lock(&block)
# }, env);
#
# comes back as value: RuntimeError !
elsif e.value.to_s =~ /missing closing `}`/
elsif e.value.to_s =~ /missing closing `\}`/
raise Less::ParseError.new(e.value.to_s)
end
raise Less::Error.new(e)
Expand Down

0 comments on commit 8511710

Please sign in to comment.