aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2013-11-20 22:48:08 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2013-11-20 22:48:08 +0530
commit26f8fb8641ee20fbda459755777acff93f3f5416 (patch)
treee5ea33c4eb90f57488a193ccccb79eb5ae41429b /railties/lib/rails/commands
parentda800614cac8b5935d0fd352af4a99d73cd13de8 (diff)
downloadrails-26f8fb8641ee20fbda459755777acff93f3f5416.tar.gz
rails-26f8fb8641ee20fbda459755777acff93f3f5416.tar.bz2
rails-26f8fb8641ee20fbda459755777acff93f3f5416.zip
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
Diffstat (limited to 'railties/lib/rails/commands')
-rw-r--r--railties/lib/rails/commands/runner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb
index 2b77d5d387..dd2ee5639e 100644
--- a/railties/lib/rails/commands/runner.rb
+++ b/railties/lib/rails/commands/runner.rb
@@ -50,5 +50,5 @@ elsif File.exist?(code_or_file)
$0 = code_or_file
Kernel.load code_or_file
else
- eval(code_or_file)
+ eval(code_or_file, binding, __FILE__, __LINE__)
end