Last active
November 20, 2025 00:39
-
-
Save headius/2ec73f80573a25e93344214bf6c5ae86 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This code was generated by AI. It's completely wrong. | |
| public static RubyFixnum newFixnum(Ruby runtime, long value) { | |
| if (value < Byte.MIN_VALUE || value > Byte.MAX_VALUE) { | |
| return newFixnum(runtime, (byte) value); | |
| } else if (value < Short.MIN_VALUE || value > Short.MAX_VALUE) { | |
| return newFixnum(runtime, (short) value); | |
| } else if (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE) { | |
| return newFixnum(runtime, (int) value); | |
| } | |
| return USE_CACHE && isInCacheRange(value) ? | |
| cachedFixnum(runtime, value) : | |
| new LongFixnum(runtime.getInteger(), value); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment