protected boolean int_round_zero_p(ThreadContext context, int ndigits) { long bytes = num2long(sites(context).size.call(context, this, this)); return (-0.415241 * ndigits - 0.125 > bytes); }
protected boolean int_round_zero_p(ThreadContext context, int ndigits) { long bytes = num2long(sites(context).size.call(context, this, this)); return (-0.415241 * ndigits - 0.125 > bytes); }
@JRubyMethod(name = "write_string") public IRubyObject write_string(ThreadContext context, IRubyObject strArg, IRubyObject lenArg) { ByteList bl = strArg.convertToString().getByteList(); getMemoryIO().put(0, bl.getUnsafeBytes(), bl.begin(), Math.min(bl.length(), (int) org.jruby.RubyInteger.num2long(lenArg))); return this; }
@JRubyMethod(name = "write_string") public IRubyObject write_string(ThreadContext context, IRubyObject strArg, IRubyObject lenArg) { ByteList bl = strArg.convertToString().getByteList(); getMemoryIO().put(0, bl.getUnsafeBytes(), bl.begin(), Math.min(bl.length(), (int) org.jruby.RubyInteger.num2long(lenArg))); return this; }
@JRubyMethod(name = "write_string") public IRubyObject write_string(ThreadContext context, IRubyObject strArg, IRubyObject lenArg) { ByteList bl = strArg.convertToString().getByteList(); getMemoryIO().put(0, bl.getUnsafeBytes(), bl.begin(), Math.min(bl.length(), (int) org.jruby.RubyInteger.num2long(lenArg))); return this; }
@JRubyMethod(name = "write_string") public IRubyObject write_string(ThreadContext context, IRubyObject strArg, IRubyObject lenArg) { ByteList bl = strArg.convertToString().getByteList(); getMemoryIO().put(0, bl.getUnsafeBytes(), bl.begin(), Math.min(bl.length(), (int) org.jruby.RubyInteger.num2long(lenArg))); return this; }