Resolved many Rubocop warnings

This commit is contained in:
Maruno17
2020-09-06 17:31:12 +01:00
parent 6c4670eaa3
commit 681a8331ab
137 changed files with 921 additions and 1200 deletions

View File

@@ -248,7 +248,7 @@ class LinearCongRandom
def self.dsSeed
t = Time.now
seed = (((t.mon*t.mday+t.min+t.sec)&0xFF)<<24) | (t.hour<<16) | (t.year-2000)
seed = (((t.mon*t.mday+t.min+t.sec)&0xFF)<<24) | (t.hour << 16) | (t.year-2000)
seed = (seed+0xFFFFFFFF)+1 if seed<0
return seed
end
@@ -416,9 +416,8 @@ class MiniXmlReader
raise ArgumentError.new("Illegal character") if codepoint<9 ||
codepoint==11 || codepoint==12 || (codepoint>=14 && codepoint<32) ||
codepoint==0xFFFE || codepoint==0xFFFF || (codepoint>=0xD800 && codepoint<0xE000)
if codepoint<=0x7F
return codepoint.chr
elsif codepoint<=0x7FF
return codepoint.chr if codepoint<=0x7F
if codepoint<=0x7FF
str = (0xC0|((codepoint>>6)&0x1F)).chr
str += (0x80|(codepoint &0x3F)).chr
return str
@@ -436,7 +435,6 @@ class MiniXmlReader
else
raise ArgumentError.new("Illegal character")
end
return str
end
def unescape(attr) #:nodoc: