leon 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/io.rb +6 -6
- metadata +1 -1
data/lib/io.rb
CHANGED
@@ -193,22 +193,22 @@ module LEON
|
|
193
193
|
elsif v.is_a? Fixnum
|
194
194
|
if v < 0
|
195
195
|
v = v.abs
|
196
|
-
if v < (1 <<
|
196
|
+
if v < (1 << 7)
|
197
197
|
return Constants::CHAR
|
198
|
-
elsif v < (1 <<
|
198
|
+
elsif v < (1 << 15)
|
199
199
|
return Constants::SHORT
|
200
|
-
elsif v < (1 <<
|
200
|
+
elsif v < (1 << 31)
|
201
201
|
return Constants::INT
|
202
202
|
end
|
203
203
|
return Constants::DOUBLE
|
204
204
|
end
|
205
|
-
if v < (1 <<
|
205
|
+
if v < (1 << 8)
|
206
206
|
return Constants::UNSIGNED_CHAR
|
207
207
|
end
|
208
|
-
if v < (1 <<
|
208
|
+
if v < (1 << 16)
|
209
209
|
return Constants::UNSIGNED_SHORT
|
210
210
|
end
|
211
|
-
if v < (1 <<
|
211
|
+
if v < (1 << 32)
|
212
212
|
return Constants::UNSIGNED_INT
|
213
213
|
end
|
214
214
|
return Constants::DOUBLE
|