Unverified Commit 8c276f95 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5091 from zubycz/remove_unnecessary_assignment

Remove unnecessary assignment in String#upto
parents 8853b035 59af2177
...@@ -422,7 +422,6 @@ class String ...@@ -422,7 +422,6 @@ class String
# both edges are all digits # both edges are all digits
bi = self.to_i(10) bi = self.to_i(10)
ei = max.to_i(10) ei = max.to_i(10)
len = self.length
if (bi > 0 or bi == "0"*len) and (ei > 0 or ei == "0"*maxlen) if (bi > 0 or bi == "0"*len) and (ei > 0 or ei == "0"*maxlen)
while bi <= ei while bi <= ei
break if exclusive and bi == ei break if exclusive and bi == ei
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment