`ungetc19': can't convert String into Integer ---------------------------------------------
Key: JRUBY-5454 URL: http://jira.codehaus.org/browse/JRUBY-5454 Project: JRuby Issue Type: Bug Components: Core Classes/Modules, Ruby 1.9 Affects Versions: JRuby 1.6RC1 Environment: $ uname -a Darwin MacBook-Pro.local 10.6.0 Darwin Kernel Version 10.6.0: Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386 $ jruby --version jruby 1.6.0.RC1 (ruby 1.9.2 trunk 136) (2011-01-10 769f847) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_22) [darwin-x86_64-java] Reporter: Kiyoka Nishiyama Attachments: t2.zip JRuby can't handle the ";" character by ungetc method. {code:title=t2.rb|borderStyle=solid} # -*- coding: utf-8 -*- def ungetc_test( filename ) open( filename, "r:utf-8" ) {|f| ch = f.getc printf( "first : [%s]\n", ch ) f.ungetc( ch ) ch2 = f.getc printf( "second : [%s]\n", ch2 ) } end ungetc_test( "./t2.txt") {code} {code:title=t2.txt} ; {code} {code:title=result of JRuby 1.6.0 RC1} $ jruby t2.rb first : [;] org/jruby/RubyIO.java:2389:in `ungetc19': can't convert String into Integer (TypeError) from t2.rb:7:in `ungetc_test' from org/jruby/RubyIO.java:1066:in `open' from org/jruby/RubyKernel.java:310:in `open19' from t2.rb:4:in `ungetc_test' from t2.rb:13:in `(root)' {code} {code:title=result of CRuby 1.9.2p136} $ ruby t2.rb first : [;] second : [;] {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email