ruby-changes:10091
From: yugui <ko1@a...>
Date: Sat, 17 Jan 2009 21:20:17 +0900 (JST)
Subject: [ruby-changes:10091] Ruby:r21633 (ruby_1_9_1): merges r21625 from trunk into ruby_1_9_1.
yugui 2009-01-17 21:19:53 +0900 (Sat, 17 Jan 2009) New Revision: 21633 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21633 Log: merges r21625 from trunk into ruby_1_9_1. * lib/irb/xmp.rb: multilingualizes XMP::StringInputMethod. [ruby-core:21383]. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/lib/irb/xmp.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21632) +++ ruby_1_9_1/ChangeLog (revision 21633) @@ -1,3 +1,8 @@ +Sat Jan 17 17:58:22 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * lib/irb/xmp.rb: multilingualizes XMP::StringInputMethod. + [ruby-core:21383]. + Sat Jan 17 11:12:21 2009 Nobuyoshi Nakada <nobu@r...> * vm_dump.c (vm_stack_dump_each): initialized at declarations. Index: ruby_1_9_1/lib/irb/xmp.rb =================================================================== --- ruby_1_9_1/lib/irb/xmp.rb (revision 21632) +++ ruby_1_9_1/lib/irb/xmp.rb (revision 21633) @@ -72,8 +72,20 @@ end def puts(exps) + if @encoding and exps.encoding != @encoding + enc = Encoding.compatible?(@exps.join("\n"), exps) + if enc.nil? + raise Encoding::CompatibilityError, "Encoding in which the passed exression is encoded is not compatible to the preceding's one" + else + @encoding = enc + end + else + @encoding = exps.encoding + end @exps.concat exps.split(/\n/) end + + attr_reader :encoding end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/