Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add line numbers and file names to eval calls.

Closes #528
  • Loading branch information...
commit 820b70492cb6418c4ac5c6949fe9a338323ea845 1 parent 3fc9279
@tenderlove authored nex3 committed
View
2  lib/sass/callbacks.rb
@@ -48,7 +48,7 @@ def clear_callbacks!
# @param name [Symbol] The name of the callback
# @return [void]
def define_callback(name)
- class_eval <<RUBY
+ class_eval <<RUBY, __FILE__, __LINE__ + 1
def on_#{name}(&block)
@_sass_callbacks ||= {}
(@_sass_callbacks[#{name.inspect}] ||= []) << block
View
6 lib/sass/logger/log_level.rb
@@ -36,14 +36,14 @@ def log_level(name, options = {})
end
def define_logger(name, options = {})
- class_eval %Q{
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{name}(message)
#{options.fetch(:to, :log)}(#{name.inspect}, message)
end
- }
+ RUBY
end
end
end
end
-end
+end
View
4 lib/sass/script/parser.rb
@@ -203,7 +203,7 @@ def associative?(op)
# sub is the name of the production beneath it,
# and ops is a list of operators for this precedence level
def production(name, sub, *ops)
- class_eval <<RUBY
+ class_eval <<RUBY, __FILE__, __LINE__ + 1
def #{name}
interp = try_ops_after_interp(#{ops.inspect}, #{name.inspect}) and return interp
return unless e = #{sub}
@@ -223,7 +223,7 @@ def #{name}
end
def unary(op, sub)
- class_eval <<RUBY
+ class_eval <<RUBY, __FILE__, __LINE__ + 1
def unary_#{op}
return #{sub} unless tok = try_tok(:#{op})
interp = try_op_before_interp(tok) and return interp
Please sign in to comment.
Something went wrong with that request. Please try again.