summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--test/ruby/test_m17n.rb8
-rw-r--r--transcode.c6
3 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,9 @@
Thu Mar 22 22:30:44 2012 Hiroshi Shirosaki <[email protected]>
* io.c (static int io_fflush): add the definition.
@@ -1410,6 +1410,14 @@ class TestM17N < Test::Unit::TestCase
assert_equal(true, s.valid_encoding?)
s << "\xff".force_encoding("utf-16be")
assert_equal(false, s.valid_encoding?, bug4018)
end
def test_getbyte
@@ -2785,6 +2785,10 @@ str_encode_bang(int argc, VALUE *argv, VALUE str)
encidx = str_transcode(argc, argv, &newstr);
if (encidx < 0) return str;
rb_str_shared_replace(str, newstr);
return str_encode_associate(str, encidx);
}
@@ -2871,6 +2875,8 @@ encoded_dup(VALUE newstr, VALUE str, int encidx)
if (encidx < 0) return rb_str_dup(str);
if (newstr == str) {
newstr = rb_str_dup(str);
}
else {
RBASIC(newstr)->klass = rb_obj_class(str);