summaryrefslogtreecommitdiff
path: root/ruby/test
diff options
context:
space:
mode:
authorjose <jose@ip-10-203-235-52.ec2.internal>2016-03-15 06:12:26 -0400
committerjose <jose@ip-10-203-235-52.ec2.internal>2016-03-15 06:12:26 -0400
commit30290208132c9a7fbfbef7398e116e84f2d31290 (patch)
tree74f4d86dbc526a534815d9b536cdb462a1c2a6bb /ruby/test
parentICE-7019 - remove db tools dependency on IcePatch2 (diff)
downloadice-30290208132c9a7fbfbef7398e116e84f2d31290.tar.bz2
ice-30290208132c9a7fbfbef7398e116e84f2d31290.tar.xz
ice-30290208132c9a7fbfbef7398e116e84f2d31290.zip
Ruby 1.8 Ice/operations fix to no use force_encoding new in Ruby 1.9
Diffstat (limited to 'ruby/test')
-rw-r--r--ruby/test/Ice/operations/Twoways.rb31
1 files changed, 16 insertions, 15 deletions
diff --git a/ruby/test/Ice/operations/Twoways.rb b/ruby/test/Ice/operations/Twoways.rb
index 3ef8588ac55..e8a70e7e1a5 100644
--- a/ruby/test/Ice/operations/Twoways.rb
+++ b/ruby/test/Ice/operations/Twoways.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
# **********************************************************************
#
# Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
@@ -12,75 +13,75 @@ def twoways(communicator, p)
literals = p.opStringLiterals();
- test(Test::S0 == "\\".force_encoding("utf-8") &&
+ test(Test::S0 == "\\" &&
Test::S0 == Test::Sw0 &&
Test::S0 == literals[0] &&
Test::S0 == literals[11]);
- test(Test::S1 == "A".force_encoding("utf-8") &&
+ test(Test::S1 == "A" &&
Test::S1 == Test::Sw1 &&
Test::S1 == literals[1] &&
Test::S1 == literals[12]);
- test(Test::S2 == "Ice".force_encoding("utf-8") &&
+ test(Test::S2 == "Ice" &&
Test::S2 == Test::Sw2 &&
Test::S2 == literals[2] &&
Test::S2 == literals[13]);
- test(Test::S3 == "A21".force_encoding("utf-8") &&
+ test(Test::S3 == "A21" &&
Test::S3 == Test::Sw3 &&
Test::S3 == literals[3] &&
Test::S3 == literals[14]);
- test(Test::S4 == "\\u0041 \\U00000041".force_encoding("utf-8") &&
+ test(Test::S4 == "\\u0041 \\U00000041" &&
Test::S4 == Test::Sw4 &&
Test::S4 == literals[4] &&
Test::S4 == literals[15]);
- test(Test::S5 == "\xc3\xbf".force_encoding("utf-8") &&
+ test(Test::S5 == "\xc3\xbf" &&
Test::S5 == Test::Sw5 &&
Test::S5 == literals[5] &&
Test::S5 == literals[16]);
- test(Test::S6 == "\xcf\xbf".force_encoding("utf-8") &&
+ test(Test::S6 == "\xcf\xbf" &&
Test::S6 == Test::Sw6 &&
Test::S6 == literals[6] &&
Test::S6 == literals[17]);
- test(Test::S7 == "\xd7\xb0".force_encoding("utf-8") &&
+ test(Test::S7 == "\xd7\xb0" &&
Test::S7 == Test::Sw7 &&
Test::S7 == literals[7] &&
Test::S7 == literals[18]);
- test(Test::S8 == "\xf0\x90\x80\x80".force_encoding("utf-8") &&
+ test(Test::S8 == "\xf0\x90\x80\x80" &&
Test::S8 == Test::Sw8 &&
Test::S8 == literals[8] &&
Test::S8 == literals[19]);
- test(Test::S9 == "\xf0\x9f\x8d\x8c".force_encoding("utf-8") &&
+ test(Test::S9 == "\xf0\x9f\x8d\x8c" &&
Test::S9 == Test::Sw9 &&
Test::S9 == literals[9] &&
Test::S9 == literals[20]);
- test(Test::S10 == "\xe0\xb6\xa7".force_encoding("utf-8") &&
+ test(Test::S10 == "\xe0\xb6\xa7" &&
Test::S10 == Test::Sw10 &&
Test::S10 == literals[10] &&
Test::S10 == literals[21]);
- test(Test::Ss0 == "\'\"\x3f\\\a\b\f\n\r\t\v".force_encoding("utf-8") &&
+ test(Test::Ss0 == "\'\"\x3f\\\a\b\f\n\r\t\v" &&
Test::Ss0 == Test::Ss1 &&
Test::Ss0 == Test::Ss2 &&
Test::Ss0 == literals[22] &&
Test::Ss0 == literals[23] &&
Test::Ss0 == literals[24]);
- test(Test::Ss3 == "\\\\U\\u\\".force_encoding("utf-8") &&
+ test(Test::Ss3 == "\\\\U\\u\\" &&
Test::Ss3 == literals[25]);
- test(Test::Ss4 == "\\A\\".force_encoding("utf-8") &&
+ test(Test::Ss4 == "\\A\\" &&
Test::Ss4 == literals[26]);
- test(Test::Ss5 == "\\u0041\\".force_encoding("utf-8") &&
+ test(Test::Ss5 == "\\u0041\\" &&
Test::Ss5 == literals[27]);
test(Test::Su0 == Test::Su1 &&