Project

General

Profile

Actions

Bug #2511

closed

irb exits unexpectedly windows

Added by vavdeev (Vlad Why) over 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]
Backport:
[ruby-core:27275]

Description

=begin
WINDOWS XP

D:\server\ruby\bin>chcp
Active code page: 866

D:\server\ruby\bin>irb
irb(main):001:0> лорлор <---- russian chars

D:\server\ruby\bin> <----- exited

also I can't type any characters with "right alt" using belgium/french keyboard layout ( "AltGr"+2 = @ "AltGr"+3 = # ....)

I always disable readline with this .... no colors, no autocompletion (((((

require File.dirname(FILE) + '/readline/readline'
module Readline
def readline prompt, something
print prompt
return $stdin.gets.strip
end
def self.readline prompt, something
print prompt
return $stdin.gets.strip
end
end
=end

Actions #1

Updated by zenspider (Ryan Davis) over 14 years ago

=begin

On Dec 21, 2009, at 13:28 , Vlad Why wrote:

Bug #2511: irb exits unexpectedly windows
http://redmine.ruby-lang.org/issues/show/2511

Author: Vlad Why
Status: Open, Priority: Low
Category: lib
ruby -v: ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]

WINDOWS XP

D:\server\ruby\bin>chcp
Active code page: 866

D:\server\ruby\bin>irb
irb(main):001:0> лорлор <---- russian chars

D:\server\ruby\bin> <----- exited

also I can't type any characters with "right alt" using belgium/french keyboard layout ( "AltGr"+2 = @ "AltGr"+3 = # ....)

I always disable readline with this .... no colors, no autocompletion (((((

require File.dirname(FILE) + '/readline/readline'
module Readline
def readline prompt, something
print prompt
return $stdin.gets.strip
end
def self.readline prompt, something
print prompt
return $stdin.gets.strip
end
end

I don't have any solutions for you, but I think you can reduce your above workaround via:

   @use_readline = IRB.conf[:USE_READLINE]

Setting to false should bypass readline.

=end

Actions #2

Updated by usa (Usaku NAKAMURA) over 14 years ago

  • Status changed from Open to Assigned
  • Assignee set to kouji (Kouji Takao)

=begin
It seems the bug of libreadline.
FYI, ruby 1.8.8dev has that the same problem.
=end

Actions #3

Updated by vavdeev (Vlad Why) over 14 years ago

=begin
the bug is still present when readline is disabled

D:\server\ruby\bin>chcp
Active code page: 866

D:\server\ruby\bin>irb --noreadline
irb(main):001:0> орпррп

D:\server\ruby\bin>
=end

Actions #4

Updated by zenspider (Ryan Davis) over 14 years ago

=begin

On Jan 3, 2010, at 13:10 , Vlad Why wrote:

Issue #2511 has been updated by Vlad Why.

the bug is still present when readline is disabled

D:\server\ruby\bin>chcp
Active code page: 866

D:\server\ruby\bin>irb --noreadline
irb(main):001:0> орпррп

D:\server\ruby\bin>

I can confirm that this isn't isolated to windows:

501 % ruby -d -S irb --noreadline

орпррп
502 %

This is in a UTF-8 terminal (on osx) and it doesn't matter if I convert the text above to UTF-8 or not.

Wow:

505 % ruby -d -S irb --noreadline --irb_debug 99 --tracer
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tracer.rb:150: warning: tried to create Proc object without a block
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/ext/tracer.rb:32: warning: instance variable @irb_path not initialized
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/tracer.rb:146: warning: tried to create Proc object without a block

орпррп
506 %

=end

Actions #5

Updated by zenspider (Ryan Davis) over 14 years ago

=begin

On Jan 3, 2010, at 13:10 , Vlad Why wrote:

Issue #2511 has been updated by Vlad Why.

the bug is still present when readline is disabled

D:\server\ruby\bin>chcp
Active code page: 866

D:\server\ruby\bin>irb --noreadline
irb(main):001:0> орпррп

Here we go:

512 % ~/.multiruby/install/1.9.1-p129/bin/ruby -d ~/.multiruby/install/1.9.1-p129/bin/irb --tracer --noreadline
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/context.rb:166: warning: method redefined; discarding old irb_name
Exception `LoadError' at /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/locale.rb:127 - No such file to load -- irb/encoding_aliases.rb
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ext/tracer.rb:31: warning: instance variable @irb_path not initialized

лорлор
Exception Errno::ENOENT' at /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/tracer.rb:87 - No such file or directory - (irb) #0:(irb):1:Object:-: - #0:(irb):1:BasicObject:>: - #0:(irb):1:NameError::message:>: - #0:(irb):1:NameError::message:<: - #0:(irb):1:NameError:>: - #0:(irb):1:StandardError:>: - #0:(irb):1:StandardError:<: - #0:(irb):1:NameError:<: - #0:(irb):1:Exception:>: - #0:(irb):1:Exception:<: - #0:(irb):1:Exception:>: - #0:(irb):1:Exception:<: - #0:(irb):1:NameError:>: - #0:(irb):1:NameError::message:>: - #0:(irb):1:Kernel:>: - #0:(irb):1:main:>: - #0:(irb):1:main:<: - #0:(irb):1:Kernel:<: - #0:(irb):1:Symbol:>: - #0:(irb):1:Symbol:<: - #0:(irb):1:NameError::message:<: - #0:(irb):1:NameError:<: - Exception NameError' at (irb):1 - undefined local variable or method лорлор' for main:Object #0:(irb):1:Object:: - Exception NilClass' at /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/workspace.rb:80 - undefined local variable or method `лорлор' for main:Object
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ext/tracer.rb: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin10.0.0]

-- control frame ----------
c:0021 p:0021 s:0075 b:0075 l:000448 d:0019b0 BLOCK
c:0020 p:0087 s:0072 b:0071 l:000448 d:000448 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ext/tracer.rb:50
c:0019 p:0031 s:0064 b:0063 l:000062 d:000062 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/context.rb:218
c:0018 p:0030 s:0058 b:0058 l:0001d8 d:000057 BLOCK /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:149
c:0017 p:0037 s:0050 b:0050 l:000049 d:000049 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:263
c:0016 p:0011 s:0045 b:0045 l:0001d8 d:000044 BLOCK /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:146
c:0015 p:0132 s:0041 b:0041 l:000024 d:000040 BLOCK /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:244
c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH
c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop
c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:230
c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch
c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:229
c:0008 p:0042 s:0022 b:0022 l:0001d8 d:0001d8 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:145
c:0007 p:0011 s:0019 b:0019 l:0004e8 d:000018 BLOCK /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:69
c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH
c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch
c:0004 p:0172 s:0011 b:0011 l:0004e8 d:0004e8 METHOD /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:68
c:0003 p:0039 s:0006 b:0006 l:001a88 d:0004c8 EVAL /Users/ryan/.multiruby/install/1.9.1-p129/bin/irb:12
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001a88 d:001a88 TOP

-- Ruby level backtrace information-----------------------------------------
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ext/tracer.rb:0:in ensure in evaluate' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ext/tracer.rb:50:in evaluate'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/context.rb:218:in evaluate' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:149:in block (2 levels) in eval_input'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:263:in signal_status' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:146:in block in eval_input'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:244:in block (2 levels) in each_top_level_statement' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in loop'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:230:in block in each_top_level_statement' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in catch'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in each_top_level_statement' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:145:in eval_input'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:69:in block in start' /Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:68:in catch'
/Users/ryan/.multiruby/install/1.9.1-p129/lib/ruby/1.9.1/irb.rb:68:in start' /Users/ryan/.multiruby/install/1.9.1-p129/bin/irb:12:in '

-- C level backtrace information -------------------------------------------

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap
512 %

(As an aside, --irb_debug doesn't work on 1.9, but it shows up in --help)

=end

Actions #6

Updated by mame (Yusuke Endoh) about 14 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27379.
Vlad, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0