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