Logo Search packages:      
Sourcecode: jruby1.1 version File versions

RubyString org::jruby::RubyObject::asString (  )  [inline, inherited]


First converts this object into a String using the "to_s" method, infects it with the current taint and returns it. If to_s doesn't return a Ruby String, anyToString is used instead.

Implements org::jruby::runtime::builtin::IRubyObject.

Reimplemented in org::jruby::RubyString.

Definition at line 820 of file RubyObject.java.

References org::jruby::runtime::builtin::IRubyObject::setTaint().

        IRubyObject str = RuntimeHelpers.invoke(getRuntime().getCurrentContext(), this, "to_s");
        if (!(str instanceof RubyString)) return (RubyString)anyToString();
        if (isTaint()) str.setTaint(true);
        return (RubyString) str;

Generated by  Doxygen 1.6.0   Back to index