--------------060901000402040700090207
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
I wrote a script. A problem occurred when I ran this script using Ruby
1.8.1 and CVS 1.8.2. However, no problem occurred using Ruby 1.9.0.
Similarly, is this problem repaired in Ruby 1.8.2?
Sincerely,
--
Hiroyuki Iwatsuki <URL:mailto:don / na.rim.or.jp>
--------------060901000402040700090207
Content-Type: text/plain;
name est_yaml_textfolding.rb"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename est_yaml_textfolding.rb"
#!/usr/local/bin/ruby
require 'test/unit'
require 'fileutils'
require 'yaml'
A_UTF8 \343\201\202" # Hiragana 'a' (UTF-8)
A_EUC \244\242" # Hiragana 'a' (EUC-JP)
A_SJIS \202\240" # Hiragana 'a' (Shift_JIS)
class TC_YAML_TextFolding < Test::Unit::TestCase
N 0
def setup
@kcode KCODE
end
def teardown
$KCODE kcode
end
def test_sjis
$KCODE s'
N.times do |n|
str A_SJIS * n + "\n") * 5
y tr.to_yaml
assert_equal(str, YAML.load(y))
end
end
def test_euc
$KCODE e'
N.times do |n|
str A_EUC * n + "\n") * 5
y tr.to_yaml
assert_equal(str, YAML.load(y))
end
end
def test_utf8
$KCODE u'
N.times do |n|
str A_UTF8 * n + "\n") * 5
y tr.to_yaml
assert_equal(str, YAML.load(y))
end
end
end
--------------060901000402040700090207--