diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-15 07:23:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-15 07:23:38 +0000 |
commit | bb545e213146685e0cdddb064ecc3b22139e01f9 (patch) | |
tree | 1bc8218dcb482b6034435b3f6034fa92e2ce1346 /test/-ext- | |
parent | e7878d20822cf00556c5ab02d0eb0cfe1a76cb93 (diff) | |
download | ruby-bb545e213146685e0cdddb064ecc3b22139e01f9.tar.gz |
sprintf.c: coderange fix
* sprintf.c (ruby__sfvwrite): set buffer length and exclude
uninitialized garbage to get correct coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r-- | test/-ext-/test_printf.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/-ext-/test_printf.rb b/test/-ext-/test_printf.rb index f801030c07..fc4e065345 100644 --- a/test/-ext-/test_printf.rb +++ b/test/-ext-/test_printf.rb @@ -21,4 +21,11 @@ class Test_SPrintf < Test::Unit::TestCase def test_inspect assert_equal("{<#{self.class}:#{object_id}>}", Bug::Printf.v(self)) end + + def test_encoding + def self.to_s + "\u{3042 3044 3046 3048 304a}" + end + assert_equal("<\u{3042 3044 3046 3048 304a}>", Bug::Printf.s(self)) + end end |