1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/irb/xmp.rb: multilingualizes XMP::StringInputMethod.

[ruby-core:21383].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-01-17 08:59:54 +00:00
parent 9cd0874fc2
commit fa1bec3664
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Sat Jan 17 17:58:22 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* lib/irb/xmp.rb: multilingualizes XMP::StringInputMethod.
[ruby-core:21383].
Sat Jan 17 15:01:22 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (make_inspectname): add a res argument to

View file

@ -72,8 +72,20 @@ class XMP
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