@@ -47,36 +47,34 @@ def test_remove_collation
47
47
end
48
48
end
49
49
50
- if RUBY_VERSION >= '1.9.1'
51
- def test_encoding
52
- comparator = Comparator . new
53
- @db . collation 'foo' , comparator
54
- @db . execute ( 'select data from ex order by 1 collate foo' )
50
+ def test_encoding
51
+ comparator = Comparator . new
52
+ @db . collation 'foo' , comparator
53
+ @db . execute ( 'select data from ex order by 1 collate foo' )
55
54
56
- a , b = *comparator . calls . first
55
+ a , b = *comparator . calls . first
57
56
58
- assert_equal Encoding . find ( 'UTF-8' ) , a . encoding
59
- assert_equal Encoding . find ( 'UTF-8' ) , b . encoding
60
- end
57
+ assert_equal Encoding . find ( 'UTF-8' ) , a . encoding
58
+ assert_equal Encoding . find ( 'UTF-8' ) , b . encoding
59
+ end
61
60
62
- def test_encoding_default_internal
63
- warn_before = $-w
64
- $-w = false
65
- before_enc = Encoding . default_internal
61
+ def test_encoding_default_internal
62
+ warn_before = $-w
63
+ $-w = false
64
+ before_enc = Encoding . default_internal
66
65
67
- Encoding . default_internal = 'EUC-JP'
68
- comparator = Comparator . new
69
- @db . collation 'foo' , comparator
70
- @db . execute ( 'select data from ex order by 1 collate foo' )
66
+ Encoding . default_internal = 'EUC-JP'
67
+ comparator = Comparator . new
68
+ @db . collation 'foo' , comparator
69
+ @db . execute ( 'select data from ex order by 1 collate foo' )
71
70
72
- a , b = *comparator . calls . first
71
+ a , b = *comparator . calls . first
73
72
74
- assert_equal Encoding . find ( 'EUC-JP' ) , a . encoding
75
- assert_equal Encoding . find ( 'EUC-JP' ) , b . encoding
76
- ensure
77
- Encoding . default_internal = before_enc
78
- $-w = warn_before
79
- end
73
+ assert_equal Encoding . find ( 'EUC-JP' ) , a . encoding
74
+ assert_equal Encoding . find ( 'EUC-JP' ) , b . encoding
75
+ ensure
76
+ Encoding . default_internal = before_enc
77
+ $-w = warn_before
80
78
end
81
79
end
82
80
end
0 commit comments