[MacRuby/MacRuby] 60c2a7: StringIO#ungetc will accept the Fixnum object.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 60c2a776167c77f9b485169103ee51dd78c32516 https://github.com/MacRuby/MacRuby/commit/60c2a776167c77f9b485169103ee51dd78... Author: Watson <watson1978@gmail.com> Date: 2011-04-05 (Tue, 05 Apr 2011) Changed paths: M lib/stringio.rb Log Message: ----------- StringIO#ungetc will accept the Fixnum object. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions require 'stringio' f = StringIO.new("abc") f.ungetc("*".ord) assert_equal("*abc", f.string) puts :ok }}} Commit: 544a4188e53a80de1289ec0b181a342a8be4a457 https://github.com/MacRuby/MacRuby/commit/544a4188e53a80de1289ec0b181a342a8b... Author: Watson <watson1978@gmail.com> Date: 2011-04-05 (Tue, 05 Apr 2011) Changed paths: M lib/stringio.rb Log Message: ----------- StringIO#ungetc will not raise an exception when was passed nil. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions require 'stringio' f = StringIO.new("abc") assert_nothing_raised{ f.ungetc(nil) } assert_equal("abc", f.string) puts :ok }}} Compare: https://github.com/MacRuby/MacRuby/compare/87ef594...544a418
participants (1)
-
noreply@github.com