Issue #4793 has been reported by Kazuki Tsujimoto.
Bug #4793: 特定のSyntaxErrorでirbが落ちる
Author: Kazuki Tsujimoto
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 1.9.3dev (2011-04-16 trunk 31298) [x86_64-linux]
=begin
以下のコードでirbが落ちます。
$ ./ruby -Ilib bin/irb
irb(main):001:0> next
SyntaxError: (irb):1: Can’t escape from eval with next
/home/k_tsj/work/ruby-trunk/lib/irb/workspace.rb:100:in sub!': can't modify frozen String (RuntimeError) (snip) from bin/irb:12:in
’
パッチです。
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index 991df2e…dd781f6 100644
— a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -97,7 +97,7 @@ EOF
when 3
return nil if bt =~ /irb/.*.rb/
return nil if bt =~ /irb.rb/
- bt.sub!(/:\s*in `irb_binding’/, ‘’)
- bt = bt.sub(/:\s*in `irb_binding’/, ‘’)
end
bt
end
=end
Issue #4793 has been updated by Kazuhiro NISHIYAMA.
Category set to lib
Assignee set to Keiju Ishitsuka
Target version set to 1.9.3
Bug #4793: 特定のSyntaxErrorでirbが落ちる
Author: Kazuki Tsujimoto
Status: Open
Priority: Normal
Assignee: Keiju Ishitsuka
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-04-16 trunk 31298) [x86_64-linux]
=begin
以下のコードでirbが落ちます。
$ ./ruby -Ilib bin/irb
irb(main):001:0> next
SyntaxError: (irb):1: Can’t escape from eval with next
/home/k_tsj/work/ruby-trunk/lib/irb/workspace.rb:100:in sub!': can't modify frozen String (RuntimeError) (snip) from bin/irb:12:in
’
パッチです。
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index 991df2e…dd781f6 100644
— a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -97,7 +97,7 @@ EOF
when 3
return nil if bt =~ /irb/.*.rb/
return nil if bt =~ /irb.rb/
- bt.sub!(/:\s*in `irb_binding’/, ‘’)
- bt = bt.sub(/:\s*in `irb_binding’/, ‘’)
end
bt
end
=end
Issue #4793 has been updated by Keiju Ishitsuka.
Status changed from Open to Closed
パッチ適用しました。
Bug #4793: 特定のSyntaxErrorでirbが落ちる
Author: Kazuki Tsujimoto
Status: Closed
Priority: Normal
Assignee: Keiju Ishitsuka
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-04-16 trunk 31298) [x86_64-linux]
=begin
以下のコードでirbが落ちます。
$ ./ruby -Ilib bin/irb
irb(main):001:0> next
SyntaxError: (irb):1: Can’t escape from eval with next
/home/k_tsj/work/ruby-trunk/lib/irb/workspace.rb:100:in sub!': can't modify frozen String (RuntimeError) (snip) from bin/irb:12:in
’
パッチです。
diff --git a/lib/irb/workspace.rb b/lib/irb/workspace.rb
index 991df2e…dd781f6 100644
— a/lib/irb/workspace.rb
+++ b/lib/irb/workspace.rb
@@ -97,7 +97,7 @@ EOF
when 3
return nil if bt =~ /irb/.*.rb/
return nil if bt =~ /irb.rb/
- bt.sub!(/:\s*in `irb_binding’/, ‘’)
- bt = bt.sub(/:\s*in `irb_binding’/, ‘’)
end
bt
end
=end