##// END OF EJS Templates
check integer ordinal range on only Ruby 1.8 (#13644)...
Toshi MARUYAMA -
r11476:0d029317594a
parent child
Show More
@@ -199,15 +199,19 module Redmine
199 199 while starting < max && line_left[starting] == line_right[starting]
200 200 starting += 1
201 201 end
202 while line_left[starting].ord.between?(128, 191) && starting > 0
203 starting -= 1
202 unless "".respond_to?(:force_encoding)
203 while line_left[starting].ord.between?(128, 191) && starting > 0
204 starting -= 1
205 end
204 206 end
205 207 ending = -1
206 208 while ending >= -(max - starting) && line_left[ending] == line_right[ending]
207 209 ending -= 1
208 210 end
209 while line_left[ending].ord.between?(128, 191) && ending > -1
210 ending -= 1
211 unless "".respond_to?(:force_encoding)
212 while line_left[ending].ord.between?(128, 191) && ending > -1
213 ending -= 1
214 end
211 215 end
212 216 unless starting == 0 && ending == -1
213 217 [starting, ending]
General Comments 0
You need to be logged in to leave comments. Login now