Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add positional information to eval call so that this information will

be used in printing correct location where the exception occurred.
Closes #12885

- Without this the location of exception is always the line on which
  'eval' is called
- But if the exception occurs in a gem outside of Rails, then that
  location is not printed in stacktrace
  • Loading branch information...
commit 26f8fb8641ee20fbda459755777acff93f3f5416 1 parent da80061
प्रथमेश prathamesh-sonpatki authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/commands/runner.rb
2  railties/lib/rails/commands/runner.rb
@@ -50,5 +50,5 @@
$0 = code_or_file
Kernel.load code_or_file
- eval(code_or_file)
+ eval(code_or_file, binding, __FILE__, __LINE__)
Please sign in to comment.
Something went wrong with that request. Please try again.