File tree Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Expand file tree Collapse file tree 1 file changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -102,33 +102,17 @@ def print_border_separator
102
102
103
103
def truncate ( string )
104
104
return string unless @truncate
105
- as_unicode do
106
- chars = string . chars . to_a
107
- if chars . length <= @truncate
108
- chars . join
109
- else
110
- chars [ 0 , @truncate - 3 - @indent ] . join + "..."
111
- end
105
+ chars = string . chars . to_a
106
+ if chars . length <= @truncate
107
+ chars . join
108
+ else
109
+ chars [ 0 , @truncate - 3 - @indent ] . join + "..."
112
110
end
113
111
end
114
112
115
113
def indentation
116
114
" " * @indent
117
115
end
118
-
119
- if "" . respond_to? ( :encode )
120
- def as_unicode
121
- yield
122
- end
123
- else
124
- def as_unicode
125
- old = $KCODE # rubocop:disable Style/GlobalVars
126
- $KCODE = "U" # rubocop:disable Style/GlobalVars
127
- yield
128
- ensure
129
- $KCODE = old # rubocop:disable Style/GlobalVars
130
- end
131
- end
132
116
end
133
117
end
134
118
end
You can’t perform that action at this time.
0 commit comments