script1 is ok, script2 crashes after the first key is pushed, before I hit the return key.
> C:/src/Ruby/playground/2.1.0-error/gets2.rb:2: [BUG] Segmentation fault
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0004 p:---- s:0010 e:000009 CFUNC :gets
c:0003 p:---- s:0008 e:000007 CFUNC :gets
c:0002 p:0013 s:0005 E:001e30 EVAL C:/src/Ruby/playground/2.1.0-error/gets2.rb:2 [FINISH]
c:0001 p:0000 s:0002 E:0023c4 TOP [FINISH]
C:/src/Ruby/playground/2.1.0-error/gets2.rb:2:in `<main>'
C:/src/Ruby/playground/2.1.0-error/gets2.rb:2:in `gets'
C:/src/Ruby/playground/2.1.0-error/gets2.rb:2:in `gets'
-- C level backtrace information -------------------------------------------
C:\Windows\SysWOW64\ntdll.dll(ZwWaitForSingleObject+0x15) [0x7763F8D1]
C:\Windows\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x77001194]
C:\Windows\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x77001148]
C:\RUBY\BIN\msvcrt-ruby210.dll(rb_vm_bugreport+0xa7) [0x6D3947A7]
C:\RUBY\BIN\msvcrt-ruby210.dll(rb_name_err_mesg_new+0x69f) [0x6D248FBF]
C:\RUBY\BIN\msvcrt-ruby210.dll(rb_bug+0x2e) [0x6D249D9E]
C:\RUBY\BIN\msvcrt-ruby210.dll(rb_check_safe_str+0x34b) [0x6D31483B]
[0x00401866]
C:\Windows\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x776974FF]
-- Other runtime information -----------------------------------------------
* Loaded script: C:/src/Ruby/playground/2.1.0-error/gets2.rb
* Loaded features:
0 enumerator.so
1 C:/RUBY/lib/ruby/2.1.0/i386-mingw32/enc/encdb.so
2 C:/RUBY/lib/ruby/2.1.0/i386-mingw32/enc/iso_8859_1.so
3 C:/RUBY/lib/ruby/2.1.0/i386-mingw32/enc/trans/transdb.so
4 C:/RUBY/lib/ruby/2.1.0/i386-mingw32/rbconfig.rb
5 C:/RUBY/lib/ruby/2.1.0/rubygems/compatibility.rb
6 C:/RUBY/lib/ruby/2.1.0/rubygems/defaults.rb
7 C:/RUBY/lib/ruby/2.1.0/rubygems/deprecate.rb
8 C:/RUBY/lib/ruby/2.1.0/rubygems/errors.rb
9 C:/RUBY/lib/ruby/2.1.0/rubygems/version.rb
10 C:/RUBY/lib/ruby/2.1.0/rubygems/requirement.rb
11 C:/RUBY/lib/ruby/2.1.0/rubygems/platform.rb
12 C:/RUBY/lib/ruby/2.1.0/rubygems/basic_specification.rb
13 C:/RUBY/lib/ruby/2.1.0/rubygems/stub_specification.rb
14 C:/RUBY/lib/ruby/2.1.0/rubygems/util/stringio.rb
15 C:/RUBY/lib/ruby/2.1.0/rubygems/specification.rb
16 C:/RUBY/lib/ruby/2.1.0/rubygems/exceptions.rb
17 C:/RUBY/lib/ruby/2.1.0/rubygems/defaults/operating_system.rb
18 C:/RUBY/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb
19 thread.rb
20 C:/RUBY/lib/ruby/2.1.0/i386-mingw32/thread.so
21 C:/RUBY/lib/ruby/2.1.0/monitor.rb
22 C:/RUBY/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb
23 C:/RUBY/lib/ruby/2.1.0/rubygems.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.