aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 12:37:05 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-04 12:37:05 +0000
commit772c19298d6046b69917035f56253c99c77a4c35 (patch)
treec5147bc257dddc28dca6f9fb37d39cdfaf00d8cc
parenta110ef359aea39502990eba1a01952411b55cda7 (diff)
downloadruby-772c19298d6046b69917035f56253c99c77a4c35.tar.gz
* lib/irb.rb (IRB::Irb::eval_input): SyntaxError should not be
considered as IRB bug. [ruby-dev:33991] * lib/irb/workspace.rb (IRB::WorkSpace::filter_backtrace): should filter 'irb.rb' as well for context mode 2 and 3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--lib/irb.rb5
-rw-r--r--lib/irb/workspace.rb2
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c68fc07b7..eb0e22b38b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Mar 4 21:35:59 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/irb.rb (IRB::Irb::eval_input): SyntaxError should not be
+ considered as IRB bug. [ruby-dev:33991]
+
+ * lib/irb/workspace.rb (IRB::WorkSpace::filter_backtrace): should
+ filter 'irb.rb' as well for context mode 2 and 3.
+
Tue Mar 4 19:10:43 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* hash.c (rb_hash_aset): should not copy key string when
diff --git a/lib/irb.rb b/lib/irb.rb
index 1274a15e9f..d700d004a0 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -156,12 +156,13 @@ module IRB
end
if exc
print exc.class, ": ", exc, "\n"
- if exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/
+ if exc.backtrace[0] =~ /irb(2)?(\/.*|-.*|\.rb)?:/ && exc.class.to_s !~ /^IRB/ &&
+ !(SyntaxError === exc)
irb_bug = true
else
irb_bug = false
end
-
+
messages = []
lasts = []
levels = 0
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index c27f7052d1..7c95106c39 100644
--- a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -93,8 +93,10 @@ EOF
end
when 2
return nil if bt =~ /irb\/.*\.rb/
+ return nil if bt =~ /irb\.rb/
when 3
return nil if bt =~ /irb\/.*\.rb/
+ return nil if bt =~ /irb\.rb/
bt.sub!(/:\s*in `irb_binding'/, '')
end
bt