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...
1 parent da80061 commit 26f8fb8641ee20fbda459755777acff93f3f5416 @prathamesh-sonpatki prathamesh-sonpatki committed Nov 20, 2013
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__)

0 comments on commit 26f8fb8

Please sign in to comment.