aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_econv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_econv.rb')
-rw-r--r--test/ruby/test_econv.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 6f098db454..115ff73ea8 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -3,7 +3,12 @@ require 'test/unit'
class TestEncodingConverter < Test::Unit::TestCase
def check_ec(edst, esrc, eres, dst, src, ec, off, len, opts=nil)
- res = ec.primitive_convert(src, dst, off, len, opts)
+ case opts
+ when Hash
+ res = ec.primitive_convert(src, dst, off, len, **opts)
+ else
+ res = ec.primitive_convert(src, dst, off, len, opts)
+ end
assert_equal([edst.b, esrc.b, eres],
[dst.b, src.b, res])
end