Skip to content

Instantly share code, notes, and snippets.

@calavera
Created August 19, 2010 18:01
Show Gist options
  • Save calavera/538495 to your computer and use it in GitHub Desktop.
Save calavera/538495 to your computer and use it in GitHub Desktop.
public static RubyFloat str2fnum19(Ruby runtime, RubyString arg, boolean strict) {
if (arg.toString().startsWith("0x")) { // convert hexadecimal strings
return ConvertBytes.byteListToInum19(runtime, arg.getByteList(), 16, false).toFloat();
}
return str2fnumCommon(runtime, arg, strict, biteListCaller19);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment