jruby/docs BETA
Navigation
org.jruby 120
C AbstractRubyMethod
I Appendable
C BasicObjectStub
I DelegatedModule
E EvalType
C FiberScheduler
I Finalizable
C FlagRegistry
C IncludedModule
C IncludedModuleWrapper
C JarBootstrapMain
C Main
C MetaClass
C NativeException
I ObjectFlags
I ParseResult
C PrependedModule
I Profile
C Ruby
C RubyArgsFile
C RubyArgumentError
C RubyArithmeticSequence
C RubyArray
C RubyBasicObject
C RubyBignum
C RubyBinding
C RubyBoolean
C RubyChain
C RubyClass
C RubyClassPathVariable
C RubyComparable
C RubyComplex
C RubyConcurrencyError
C RubyContinuation
C RubyConverter
C RubyData
C RubyDir
C RubyDomainError
C RubyEOFError
C RubyEncoding
C RubyEncodingError
C RubyEnumerable
C RubyEnumerator
C RubyException
C RubyFatal
C RubyFiberError
C RubyFile
C RubyFileStat
C RubyFileTest
C RubyFixnum
C RubyFloat
C RubyFloatDomainError
C RubyFrozenError
C RubyGC
C RubyGenerator
C RubyGlobal
C RubyHash
C RubyIO
C RubyIOBuffer
C RubyIOError
C RubyIndexError
C RubyInstanceConfig
C RubyInteger
C RubyInterrupt
C RubyInterruptedRegexpError
C RubyKernel
C RubyKeyError
C RubyLoadError
C RubyLocalJumpError
C RubyMarshal
C RubyMatchData
C RubyMath
C RubyMethod
C RubyModule
C RubyNameError
C RubyNil
C RubyNoMatchingPatternError
C RubyNoMatchingPatternKeyError
C RubyNoMemoryError
C RubyNoMethodError
C RubyNotImplementedError
C RubyNumeric
C RubyObject
I RubyObjectAdapter
C RubyObjectSpace
C RubyProc
C RubyProcess
C RubyProducer
C RubyRandom
C RubyRandomBase
C RubyRange
C RubyRangeError
C RubyRational
C RubyRegexp
C RubyRegexpError
I RubyRuntimeAdapter
C RubyRuntimeError
C RubyScriptError
C RubySecurityError
C RubySignal
C RubySignalException
C RubyStandardError
C RubyStopIteration
C RubyString
C RubyStruct
C RubySymbol
C RubySyntaxError
C RubySystemCallError
C RubySystemExit
C RubySystemStackError
C RubyThread
C RubyThreadError
C RubyThreadGroup
C RubyTime
C RubyTypeError
C RubyUnboundMethod
C RubyUncaughtThrowError
C RubyYielder
C RubyZeroDivisionError
C TopSelfFactory
RubyFile — members 96+
F LOCK_SH() int
F LOCK_EX() int
F LOCK_NB() int
F LOCK_UN() int
C new(runtime, type)
C new(runtime, path, in)
C new(runtime, path, channel)
M absolute_path(context, recv, path) IRubyObject
M absolute_path(context, recv, path, dir) IRubyObject
M absolute_path(context, recv, args) IRubyObject
M absolute_path_p(context, recv, arg) IRubyObject
M atime(context) IRubyObject
M atime(context, recv, filename) IRubyObject
M basename(context, recv, path) RubyString
M basename(context, recv, path, ext) RubyString
M basename(context, recv, args) IRubyObject
M birthtime(context) IRubyObject
M birthtime(context, recv, filename) IRubyObject
M canonicalize(path) String
M chmod(context, arg) IRubyObject
M chmod(context, recv, args) IRubyObject
M chown(context, arg1, arg2) IRubyObject
M chown(context, recv, args) IRubyObject
M create_file_class(context, io) RubyClass
M ctime(context) IRubyObject
M ctime(context, recv, filename) IRubyObject
M data_file(runtime, path, in) RubyFile
M delete(context, recv, args) IRubyObject
M dirname(context, recv, path) IRubyObject
M dirname(context, recv, path, arg1) IRubyObject
M dirname(context, filename) String
M dirname(context, filename, level) String
M dirname(context, recv, args) IRubyObject
M encoding() Encoding
C encoding=(encoding)
M expand_path(context, recv, path) IRubyObject
M expand_path(context, recv, path, wd) IRubyObject
M expand_path(context, relative_path, enc, cwd, expand_user, canonicalize) String
M expand_path(context, recv, args) IRubyObject
M expand_user_path(context, path) String
M expand_user_path(context, path, raise_on_relative_path) String
M extname(context, recv, arg) IRubyObject
M file(path_or_file) JRubyFile
M file_open_generic(context, filename, oflags, fmode, conv_config, perm) IRubyObject
M file_resource(context, path_or_file) FileResource
M file_resource(path_or_file) FileResource
M flock(context, operation) IRubyObject
M fnmatch(context, recv, _pattern, _path) IRubyObject
M fnmatch(context, recv, _pattern, _path, _flags) IRubyObject
M fnmatch(context, recv, args) IRubyObject
M ftype(context, recv, filename) IRubyObject
M get_adjusted_path(context, file_or_path) String
M get_adjusted_path(context, file_or_path, current_directory) String
M get_birthtime_with_nio(path_string) FileTime
M get_dir_or_file_entry(jar, path) ZipEntry
M get_dir_or_file_entry(jar, path) ZipEntry
M get_path(context, path) RubyString
M initialize(context, args, block) IRubyObject
M inspect(context) RubyString
M join(context, recv, args) RubyString
M lchmod(context, recv, args) IRubyObject
M lchown(context, recv, args) IRubyObject
M link(context, recv, from, to) IRubyObject
M lstat(context) IRubyObject
M lstat(context, recv, filename) IRubyObject
M lutime(context, recv, args) IRubyObject
M mkfifo(context, recv, path) IRubyObject
M mkfifo(context, recv, path, mode) IRubyObject
M mkfifo(context, path, mode) IRubyObject
M mtime(context) IRubyObject
M mtime(context, recv, filename) IRubyObject
M path(context, self, str) IRubyObject
M path(context) IRubyObject
M readlink(context, recv, path) IRubyObject
M realdirpath(context, recv, path) IRubyObject
M realdirpath(context, recv, path, dir) IRubyObject
M realdirpath(context, recv, args) IRubyObject
M realpath(context, recv, path) IRubyObject
M realpath(context, recv, path, cwd) IRubyObject
M realpath(context, recv, args) IRubyObject
M rename(context, recv, old_name, new_name) IRubyObject
M size(context) IRubyObject
M split(context, recv, arg) RubyArray
M split_uri(path) String[]
M starts_with_drive_letter_on_windows(path) boolean
M stat(context, recv, filename) IRubyObject
M symlink(context, recv, from, to) IRubyObject
M to_java(target) T
M to_string() String
M truncate(context, len) IRubyObject
M truncate(context, recv, path, length) IRubyObject
M truncate19(context, recv, path, length) IRubyObject
M umask(context, recv, args) IRubyObject
M unlink(context, recv, args) IRubyObject
M unlink(context, args) IRubyObject
M utime(context, recv, args) IRubyObject
from IRubyObject
F NULL_ARRAY IRubyObject[]
M check_string_type19() IRubyObject
M dup(context) IRubyObject
C marshal_live_variables(stream, context, out)
from RubyBasicObject
F ALL_F int
F BASICOBJECT_ALLOCATOR ObjectAllocator
F COMPARE_BY_IDENTITY_F int
F ERR_INSECURE_SET_INST_VAR String
F FALSE_F int
F FL_USHIFT int
F FROZEN_F int
F IS_OVERLAID_F int
F NEVER IRubyObject
F NIL_F int
F REFINED_MODULE_F int
F STAMP_OFFSET long
F TAINTED_F int
F UNDEF IRubyObject
F USER0_F int
F USER1_F int
F USER2_F int
F USER3_F int
F USER4_F int
F USER5_F int
F USER6_F int
F USER7_F int
F USER8_F int
F USER9_F int
F USERA_F int
F VAR_TABLE_OFFSET long
F varTable Object[]
F varTableStamp int
M __id__(context) RubyInteger
C add_finalizer(f)
M add_finalizer(context, f) IRubyObject
M any_to_string() IRubyObject
M as_java_string() String
M as_string() RubyString
M call_method(context, name) IRubyObject
M call_method(context, name, arg) IRubyObject
M call_method(context, name, args) IRubyObject
M call_method(name, args) IRubyObject
M call_method(name, arg) IRubyObject
M call_method(name) IRubyObject
M call_method(context, name, args, block) IRubyObject
M call_method(context, method_index, name) IRubyObject
M call_method(context, method_index, name, arg) IRubyObject
M call_super(context, args, block) IRubyObject
M check_array_type() IRubyObject
M check_call_method(context, name) IRubyObject
M check_call_method(context, sites) IRubyObject
C check_frozen()
M check_string_type() IRubyObject
M class?() boolean
M compare_to(other) int
M convert_to_array() RubyArray
M convert_to_float() RubyFloat
M convert_to_hash() RubyHash
M convert_to_integer() RubyInteger
M convert_to_integer(convert_method) RubyInteger
M convert_to_integer(method_index, convert_method) RubyInteger
M convert_to_string() RubyString
C copy_instance_variables_into(other)
C copy_special_instance_variables(clone)
M current_context() ThreadContext
M data_get_struct() Object
M data_get_struct_checked() Object
C data_wrap_struct(obj)
M decode(id) RubyString
M display(context, args) IRubyObject
M dup() IRubyObject
C ensure_instance_variables_settable()
M eql(other) boolean
M eql_p(obj) IRubyObject
M eql_p(context, obj) IRubyObject
M equal_p(context, other) IRubyObject
M eval_under(context, under, src, file, line, eval_type) IRubyObject
M extend(args) IRubyObject
M false?() boolean
M fast_get_instance_variable(interned_name) IRubyObject
M fast_get_internal_variable(interned_name) Object
M fast_has_instance_variable(interned_name) boolean
M fast_has_internal_variable(interned_name) boolean
M fast_set_instance_variable(interned_name, value) IRubyObject
C fast_set_internal_variable(interned_name, value)
M ffi_handle() Object
C ffi_handle=(value)
C for_each_instance_variable(accessor)
C for_each_instance_variable_name(consumer)
M freeze(context) IRubyObject
C frozen=(frozen)
M frozen?() boolean
M frozen_p(context) RubyBoolean
M get_flag(flag) boolean
M get_instance_variable(name) IRubyObject
M get_internal_variable(name) Object
M get_variable(index) Object
M has_instance_variable(name) boolean
M has_internal_variable(name) boolean
M has_variables?() boolean
M hash() RubyFixnum
M hash(context) RubyFixnum
M hashy_inspect() IRubyObject
M id() IRubyObject
M immediate?() boolean
M infect_by(obj) IRubyObject
M initialize(context) IRubyObject
M initialize_copy(original) IRubyObject
M inspect() IRubyObject
M instance_eval(context, block) IRubyObject
M instance_eval(context, arg0, block) IRubyObject
M instance_eval(context, arg0, arg1, block) IRubyObject
M instance_eval(context, arg0, arg1, arg2, block) IRubyObject
M instance_eval(context, args, block) IRubyObject
M instance_exec(context, args, block) IRubyObject
M instance_of_p(context, type) RubyBoolean
M instance_variable_defined_p(context, name) IRubyObject
M instance_variable_get(context, name) IRubyObject
M instance_variable_list() IRubyObject>>
M instance_variable_name_list() List<String>
M instance_variable_set(name, value) IRubyObject
M instance_variables() InstanceVariables
M instance_variables(context) RubyArray
M internal_variables() InternalVariables
M is_builtin(method_name) boolean
M java_class() Class<?>
M kind_of_p(context, type) RubyBoolean
M make_meta_class(super_class) RubyClass
M make_meta_class(context, super_class) RubyClass
M make_meta_class_bootstrap(runtime, super_class, class) RubyClass
M marshal_variable_list() Variable<Object>>
M meta_class() RubyClass
C meta_class=(meta_class)
M method(name) IRubyObject
M method(name, refined_scope) IRubyObject
M method(context, name, refined_scope) IRubyObject
M methods(context, args) IRubyObject
M methods(context, args, use_symbols) IRubyObject
M module?() boolean
M native_handle() Object
C native_handle=(value)
M native_type_index() int
M nil?() boolean
M nil_p(context) IRubyObject
M op_cmp(context, other) IRubyObject
M op_equal(context, obj) IRubyObject
M op_match(context, arg) IRubyObject
M op_not(context) IRubyObject
M op_not_equal(context, other) IRubyObject
M op_not_match(context, arg) IRubyObject
M private_methods(context, args) IRubyObject
M protected_methods(context, args) IRubyObject
M public_methods(context, args) IRubyObject
M rb_clone() IRubyObject
M rb_clone(context, maybe_opts) IRubyObject
C remove_finalizers()
M remove_instance_variable(name) IRubyObject
M remove_instance_variable(context, name, block) IRubyObject
M remove_internal_variable(name) Object
M respond_to_p(mname) RubyBoolean
M respond_to_p(mname, include_private) RubyBoolean
M responds_to(name) boolean
M responds_to_missing(name) boolean
M responds_to_missing(name, inc_private) boolean
M runtime() Ruby
M send(context, block) IRubyObject
M send(context, arg0, block) IRubyObject
M send(context, arg0, arg1, block) IRubyObject
M send(context, arg0, arg1, arg2, block) IRubyObject
M send(context, args, block) IRubyObject
C set_flag(flag, set)
M set_instance_variable(name, value) IRubyObject
C set_internal_variable(name, value)
C set_variable(index, value)
M singleton_class() RubyClass
M singleton_class(context) RubyClass
M singleton_method(name) IRubyObject
M singleton_method(context, name) IRubyObject
M singleton_methods(context, args) RubyArray
M special_const?() boolean
M special_object?() boolean
M specific_eval(context, mod, block, eval_type) IRubyObject
M specific_eval(context, mod, arg, block, eval_type) IRubyObject
M specific_eval(context, mod, arg0, arg1, block, eval_type) IRubyObject
M specific_eval(context, mod, arg0, arg1, arg2, block, eval_type) IRubyObject
C sync_variables(other)
C sync_variables(variables)
M taint(context) IRubyObject
C taint=(taint)
M taint?() boolean
M tainted_p(context) RubyBoolean
M to_a(context) RubyArray
M to_a() RubyArray
M to_s() IRubyObject
M to_s(context) IRubyObject
M true?() boolean
M trust(context) IRubyObject
M type() RubyClass
M type() RubyClass
M untaint(context) IRubyObject
M untrust(context) IRubyObject
C untrusted=(untrusted)
M untrusted?() boolean
M untrusted_p(context) RubyBoolean
M variable_count() int
M variable_list() Variable<Object>>
M variable_name_list() List<String>
from RubyObject
F IVAR_INSPECTING_OBJECT_ALLOCATOR ObjectAllocator
F OBJECT_ALLOCATOR ObjectAllocator
F REIFYING_OBJECT_ALLOCATOR ObjectAllocator
C attach_to_object_space()
C call_init(args, block)
C call_init(block)
C call_init(arg0, block)
C call_init(arg0, arg1, block)
C call_init(arg0, arg1, arg2, block)
C call_init(context, args, block)
C call_init(context, block)
C call_init(context, arg0, block)
C call_init(context, arg0, arg1, block)
C call_init(context, arg0, arg1, arg2, block)
M convert_to_type(target, convert_method_index) IRubyObject
M equals(other) boolean
M hash_code() int
M op_eqq(context, other) IRubyObject
M specific_eval(context, mod, args, block, eval_type) IRubyObject
M to_ruby_string(context) RubyString
from RubyIO
F CLOSED_STREAM_MSG String
F FD_CLOEXEC int
F PARAGRAPH_SEPARATOR ByteList
C add_blocking_thread(thread)
M advise(context, argv) IRubyObject
M autoclose(context) IRubyObject
C autoclose=(autoclose)
M autoclose?() boolean
M autoclose_set(context, autoclose) IRubyObject
M binmode() IRubyObject
M binmode(context) IRubyObject
M blocking() boolean
C blocking=(blocking)
M bom() boolean
C bom=(bom)
M bytes(context, block) IRubyObject
M channel() Channel
M chars(context, block) IRubyObject
M close(context) IRubyObject
C close()
M close_on_exec_p(context) IRubyObject
M close_on_exec_set(context, arg) IRubyObject
M close_read(context) IRubyObject
M close_write(context) IRubyObject
M closed?() boolean
M closed_p(context) RubyBoolean
M codepoints(context, block) IRubyObject
M do_read_nonblock(context, arg0, exception) IRubyObject
M do_read_nonblock(context, arg0, arg1, exception) IRubyObject
M do_read_nonblock(context, arg0, arg1, arg2, exception) IRubyObject
M do_read_nonblock(context, args, exception) IRubyObject
M do_write_nonblock(context, argv, use_exception) IRubyObject
M each(context, block) IRubyObject
M each(context, arg0, block) IRubyObject
M each(context, arg0, arg1, block) IRubyObject
M each(context, arg0, arg1, arg2, block) IRubyObject
M each(context, args, block) IRubyObject
M each_byte(context, block) IRubyObject
M each_byte_internal(context, block) IRubyObject
M each_char(context, block) IRubyObject
M each_char_internal(context, block) IRubyObject
M each_codepoint(context, block) IRubyObject
M each_line(context, block) IRubyObject
M each_line(context, arg0, block) IRubyObject
M each_line(context, arg0, arg1, block) IRubyObject
M each_line(context, arg0, arg1, arg2, block) IRubyObject
M each_line(context, args, block) IRubyObject
M ecflags() int
C ecflags=(ecflags)
M ecopts() IRubyObject
C ecopts=(ecopts)
M enc() Encoding
M enc2() Encoding
C enc2=(enc2)
C enc=(enc)
M eof_p(context) RubyBoolean
M external_encoding(context) IRubyObject
M fcntl(context, cmd) IRubyObject
M fcntl(context, cmd, arg) IRubyObject
M fileno(context) RubyFixnum
M flush(context) RubyIO
C flush()
M fsync(context) RubyFixnum
M get_byte(context) int
M get_write_io() RubyIO
M getbyte(context) IRubyObject
M getc() IRubyObject
M getc(context) IRubyObject
M getline(context, separator) IRubyObject
M getline(context, separator, limit) IRubyObject
M getline(runtime, separator) IRubyObject
M getline(runtime, separator, limit) IRubyObject
M getline(context, separator) IRubyObject
M getline(context, separator, limit) IRubyObject
M gets(context) IRubyObject
M gets(context, arg) IRubyObject
M gets(context, rs, limit_arg) IRubyObject
M gets(context, rs, limit_arg, opt) IRubyObject
M in_stream() InputStream
M initialize(context, file_number, unused) IRubyObject
M initialize(context, file_number, second, unused) IRubyObject
M initialize(context, file_number, mode_value, options, unused) IRubyObject
M initialize_copy(context, _io) IRubyObject
M input_encoding() Encoding
M internal_encoding(context) IRubyObject
M ioctl(context, args) IRubyObject
M lineno(context) RubyFixnum
M lineno_set(context, new_line_number) RubyFixnum
M lines(context, block) IRubyObject
M make_open_file() OpenFile
M native_class_index() ClassIndex
M op_append(context, an_object) IRubyObject
M op_binmode(context) IRubyObject
M open_file() OpenFile
M open_file_checked() OpenFile
M open_file_initialized() OpenFile
M out_stream() OutputStream
M path() String
M pid(context) IRubyObject
M pos(context) RubyFixnum
M pos_set(context, offset) RubyFixnum
M pread(context, len, offset) IRubyObject
M pread(context, _length, _from, str) IRubyObject
M print(context, args) IRubyObject
M print(context) IRubyObject
M print(context, arg0) IRubyObject
M print(context, arg0, arg1) IRubyObject
M print(context, arg0, arg1, arg2) IRubyObject
M printf(context, args) IRubyObject
M putc(context, ch) IRubyObject
M puts(context) IRubyObject
M puts(context, arg0) IRubyObject
M puts(context, arg0, arg1) IRubyObject
M puts(context, arg0, arg1, arg2) IRubyObject
M puts(context, args) IRubyObject
M pwrite(context, str, offset) IRubyObject
M read(args) IRubyObject
M read(context, args) IRubyObject
M read(context) IRubyObject
M read(context, length) IRubyObject
M read(context, length, maybe_str) IRubyObject
M read(context, buffer, start, len) int
M read_encoding() Encoding
M read_nonblock(context, arg0) IRubyObject
M read_nonblock(context, arg0, arg1) IRubyObject
M read_nonblock(context, arg0, arg1, arg2) IRubyObject
M read_nonblock(context, args) IRubyObject
M readbyte(context) IRubyObject
M readchar(context) IRubyObject
M readchar() IRubyObject
M readline(context) IRubyObject
M readline(context, separator) IRubyObject
M readline(context, separator, limit) IRubyObject
M readline(context, separator, limit, opts) IRubyObject
M readline(context, args) IRubyObject
M readlines(context) RubyArray
M readlines(context, arg0) RubyArray
M readlines(context, arg0, arg1) RubyArray
M readlines(context, arg0, arg1, arg2) RubyArray
M readlines(context, args) RubyArray
M readpartial(context, arg0) IRubyObject
M readpartial(context, arg0, arg1) IRubyObject
M readpartial(context, args) IRubyObject
C remove_blocking_thread(thread)
M reopen(context, args) IRubyObject
M rewind(context) RubyFixnum
M seek(context, args) RubyFixnum
M seek(context, off) RubyFixnum
M seek(context, off, whence) RubyFixnum
M set_encoding(context, encoding_obj) IRubyObject
M set_encoding(context, encoding_string, internal_encoding) IRubyObject
M set_encoding(context, encoding_string, internal_encoding, options) IRubyObject
C set_encoding(context, v1, v2, opt)
M set_encoding_by_bom(context) IRubyObject
M stat(context) IRubyObject
M sync(context) RubyBoolean
M sync() boolean
C sync=(sync)
M sync_set(sync) IRubyObject
M sync_set(context, sync) IRubyObject
M sysread(context, _length) IRubyObject
M sysread(context, _length, _str) IRubyObject
M sysread(context, args) IRubyObject
M sysseek(context, args) RubyFixnum
M syswrite(context, str) IRubyObject
M to_io() RubyIO
M tty_p(context) RubyBoolean
M ungetbyte(context, b) IRubyObject
M ungetc(context, c) IRubyObject
M wait(context, argv) IRubyObject
M wait_readable(context, argv) IRubyObject
M wait_writable(context, argv) IRubyObject
M write(context, str) IRubyObject
M write(context, args) IRubyObject
M write(context, ch) IRubyObject
C write(context, ch)
M write(context, str, nosync) IRubyObject
M write(context, bytes, start, length, encoding) int
M write(context, bytes, start, length, encoding, nosync) int
M write(bytes, start, length, encoding, nosync) int
M write(bytes, start, length, encoding) int
M write(bytes, encoding) int
C write(bite)
M write2(context, arg0, arg1) IRubyObject
M write3(context, arg0, arg1, arg2) IRubyObject
M write_nonblock(context, arg0) IRubyObject
M write_nonblock(context, arg0, arg1) IRubyObject
M write_nonblock(context, argv) IRubyObject

org.jruby.RubyFile

class extends RubyIO implements EncodingCapable 96 members

The Ruby File class.

Constants

constanttypenote
LOCK_SH int
LOCK_EX int
LOCK_NB int
LOCK_UN int

Constructors

new

new ( Ruby runtime, RubyClass type )
Java: <init>(org.jruby.Ruby runtime, org.jruby.RubyClass type)

new

new ( Ruby runtime, String path, InputStream in )
Java: <init>(org.jruby.Ruby runtime, String path, java.io.InputStream in)

new

new ( Ruby runtime, String path, FileChannel channel )
Java: <init>(org.jruby.Ruby runtime, String path, java.nio.channels.FileChannel channel)

Class Methods

absolute_path

IRubyObject absolute_path ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: absolute_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process. If the given pathname starts with a ``+~+'' it is NOT expanded, it is treated as a normal directory name.

absolute_path

IRubyObject absolute_path ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject dir )
Java: absolute_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject dir)

Converts a pathname to an absolute pathname. Relative paths are referenced from _dir_. If the given pathname starts with a ``+~+'' it is NOT expanded, it is treated as a normal directory name.

absolute_path

IRubyObject absolute_path ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: absolute_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

absolute_path_p

IRubyObject absolute_path_p ( ThreadContext context, IRubyObject recv, IRubyObject arg )
Java: absolute_path_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject arg)

atime

IRubyObject atime ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: atime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

basename

RubyString basename ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: basename(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

basename

RubyString basename ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject ext )
Java: basename(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject ext)

basename

IRubyObject basename ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: basename(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

birthtime

IRubyObject birthtime ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: birthtime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

canonicalize

String canonicalize ( String path )
Java: canonicalize(String path)

chmod

IRubyObject chmod ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: chmod(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

chown

IRubyObject chown ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: chown(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

create_file_class

RubyClass create_file_class ( ThreadContext context, RubyClass io )
Java: createFileClass(org.jruby.runtime.ThreadContext context, org.jruby.RubyClass IO)

ctime

IRubyObject ctime ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: ctime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

data_file

RubyFile data_file ( Ruby runtime, String path, SeekableByteChannel in )
Java: DATAFile(org.jruby.Ruby runtime, String path, java.nio.channels.SeekableByteChannel in)

Only used by parser (prism) so that we can get a File

nametypedescription
runtimeorg.jruby.Rubythe runtime
pathStringthe path of DATA
injava.nio.channels.SeekableByteChannelthe channel to use

Returns: a Ruby file

delete

IRubyObject delete ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: delete(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

dirname

IRubyObject dirname ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: dirname(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

dirname

IRubyObject dirname ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject arg1 )
Java: dirname(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject arg1)

dirname

String dirname ( ThreadContext context, String filename )
Java: dirname(org.jruby.runtime.ThreadContext context, String filename)

dirname

String dirname ( ThreadContext context, String filename, int level )
Java: dirname(org.jruby.runtime.ThreadContext context, String filename, int level)

dirname

IRubyObject dirname ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: dirname(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

expand_path

IRubyObject expand_path ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: expand_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process.

Returns: Resulting absolute path as a String

expand_path

IRubyObject expand_path ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject wd )
Java: expand_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject wd)

Converts a pathname to an absolute pathname. Relative paths are referenced from the given working directory. If the second argument is also relative, it will first be converted to an absolute pathname.

Returns: Resulting absolute path as a String

expand_path

String expand_path ( ThreadContext context, String relative_path, Encoding[] enc, String cwd, boolean expand_user, boolean canonicalize )
Java: expandPath(org.jruby.runtime.ThreadContext context, String relativePath, org.jcodings.Encoding[] enc, String cwd, boolean expandUser, boolean canonicalize)

expand_path

IRubyObject expand_path ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: expand_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

expand_user_path

String expand_user_path ( ThreadContext context, String path )
Java: expandUserPath(org.jruby.runtime.ThreadContext context, String path)

This method checks a path, and if it starts with ~, then it expands the path to the absolute path of the user's home directory. If the string does not begin with ~, then the string is simply returned. unaltered.

nametypedescription
pathStringPath to check

Returns: Expanded path

expand_user_path

String expand_user_path ( ThreadContext context, String path, boolean raise_on_relative_path )
Java: expandUserPath(org.jruby.runtime.ThreadContext context, String path, boolean raiseOnRelativePath)

extname

IRubyObject extname ( ThreadContext context, IRubyObject recv, IRubyObject arg )
Java: extname(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject arg)

Returns the extension name of the file. An empty string is returned if the filename (not the entire path) starts or ends with a dot.

nametypedescription
argorg.jruby.runtime.builtin.IRubyObjectPath to get extension name of

Returns: Extension, including the dot, or an empty string

file

JRubyFile file ( IRubyObject path_or_file )
Java: file(org.jruby.runtime.builtin.IRubyObject pathOrFile)

file_resource

FileResource file_resource ( ThreadContext context, IRubyObject path_or_file )
Java: fileResource(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject pathOrFile)

Get the fully-qualified JRubyFile object for the path, taking into account the runtime's current directory.

nametypedescription
contextorg.jruby.runtime.ThreadContextcurrent thread context
path_or_fileorg.jruby.runtime.builtin.IRubyObjectthe string or IO to use for the path

file_resource

FileResource file_resource ( IRubyObject path_or_file )
Java: fileResource(org.jruby.runtime.builtin.IRubyObject pathOrFile)

Get the fully-qualified JRubyFile object for the path, taking into account the runtime's current directory. Same as calling #fileResource(ThreadContext, IRubyObject)

nametypedescription
path_or_fileorg.jruby.runtime.builtin.IRubyObjectthe string or IO to use for the path

fnmatch

IRubyObject fnmatch ( ThreadContext context, IRubyObject recv, IRubyObject _pattern, IRubyObject _path )
Java: fnmatch(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject _pattern, org.jruby.runtime.builtin.IRubyObject _path)

Returns true if path matches against pattern The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters: *: Glob - match any sequence chars (re: .*). If like begins with '.' then it doesn't. ?: Matches a single char (re: .). [set]: Matches a single char in a set (re: [...]).

fnmatch

IRubyObject fnmatch ( ThreadContext context, IRubyObject recv, IRubyObject _pattern, IRubyObject _path, IRubyObject _flags )
Java: fnmatch(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject _pattern, org.jruby.runtime.builtin.IRubyObject _path, org.jruby.runtime.builtin.IRubyObject _flags)

fnmatch

IRubyObject fnmatch ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: fnmatch(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

ftype

IRubyObject ftype ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: ftype(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

get_adjusted_path

String get_adjusted_path ( ThreadContext context, IRubyObject file_or_path )
Java: getAdjustedPath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject fileOrPath)

get_adjusted_path

String get_adjusted_path ( ThreadContext context, IRubyObject file_or_path, String current_directory )
Java: getAdjustedPath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject fileOrPath, String currentDirectory)

get_birthtime_with_nio

FileTime get_birthtime_with_nio ( String path_string )
Java: getBirthtimeWithNIO(String pathString)

get_dir_or_file_entry

ZipEntry get_dir_or_file_entry ( String jar, String path )
Java: getDirOrFileEntry(String jar, String path)

get_dir_or_file_entry

ZipEntry get_dir_or_file_entry ( ZipFile jar, String path )
Java: getDirOrFileEntry(java.util.zip.ZipFile jar, String path)

get_path

RubyString get_path ( ThreadContext context, IRubyObject path )
Java: get_path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject path)

join

RubyString join ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: join(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

lchmod

IRubyObject lchmod ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: lchmod(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

lchown

IRubyObject lchown ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: lchown(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

lstat

IRubyObject lstat ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: lstat(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

lutime

IRubyObject lutime ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: lutime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

mkfifo

IRubyObject mkfifo ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: mkfifo(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

mkfifo

IRubyObject mkfifo ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject mode )
Java: mkfifo(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject mode)

mkfifo

IRubyObject mkfifo ( ThreadContext context, RubyString path, int mode )
Java: mkfifo(org.jruby.runtime.ThreadContext context, org.jruby.RubyString path, int mode)

mtime

IRubyObject mtime ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: mtime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

path

IRubyObject path ( ThreadContext context, IRubyObject self, IRubyObject str )
Java: path(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject self, org.jruby.runtime.builtin.IRubyObject str)

realdirpath

IRubyObject realdirpath ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: realdirpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

realdirpath

IRubyObject realdirpath ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject dir )
Java: realdirpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject dir)

realdirpath

IRubyObject realdirpath ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: realdirpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

realpath

IRubyObject realpath ( ThreadContext context, IRubyObject recv, IRubyObject path )
Java: realpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path)

realpath

IRubyObject realpath ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject cwd )
Java: realpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject cwd)

realpath

IRubyObject realpath ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: realpath(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

rename

IRubyObject rename ( ThreadContext context, IRubyObject recv, IRubyObject old_name, IRubyObject new_name )
Java: rename(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject oldName, org.jruby.runtime.builtin.IRubyObject newName)

split

RubyArray split ( ThreadContext context, IRubyObject recv, IRubyObject arg )
Java: split(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject arg)

split_uri

String[] split_uri ( String path )
Java: splitURI(String path)

starts_with_drive_letter_on_windows

boolean starts_with_drive_letter_on_windows ( String path )
Java: startsWithDriveLetterOnWindows(String path)

stat

IRubyObject stat ( ThreadContext context, IRubyObject recv, IRubyObject filename )
Java: stat(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject filename)

truncate

IRubyObject truncate ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject length )
Java: truncate(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject length)

truncate19

IRubyObject truncate19 ( ThreadContext context, IRubyObject recv, IRubyObject path, IRubyObject length )
Java: truncate19(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject path, org.jruby.runtime.builtin.IRubyObject length)

umask

IRubyObject umask ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: umask(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

utime

IRubyObject utime ( ThreadContext context, IRubyObject recv, IRubyObject[] args )
Java: utime(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject recv, org.jruby.runtime.builtin.IRubyObject[] args)

Instance Methods

atime

IRubyObject atime ( ThreadContext context )
Java: atime(org.jruby.runtime.ThreadContext context)

birthtime

IRubyObject birthtime ( ThreadContext context )
Java: birthtime(org.jruby.runtime.ThreadContext context)

chmod

IRubyObject chmod ( ThreadContext context, IRubyObject arg )
Java: chmod(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg)

chown

IRubyObject chown ( ThreadContext context, IRubyObject arg1, IRubyObject arg2 )
Java: chown(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

ctime

IRubyObject ctime ( ThreadContext context )
Java: ctime(org.jruby.runtime.ThreadContext context)

encoding

Encoding encoding ( )
Java: getEncoding() · also: get_encoding

encoding=

encoding= ( Encoding encoding )
Java: setEncoding(org.jcodings.Encoding encoding) · also: set_encoding

file_open_generic

IRubyObject file_open_generic ( ThreadContext context, IRubyObject filename, int oflags, int fmode, IOEncodable conv_config, int perm )
Java: fileOpenGeneric(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject filename, int oflags, int fmode, org.jruby.util.io.IOEncodable convConfig, int perm)

flock

IRubyObject flock ( ThreadContext context, IRubyObject operation )
Java: flock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject operation)

initialize

IRubyObject initialize ( ThreadContext context, IRubyObject[] args, Block block )
Java: initialize(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

inspect

RubyString inspect ( ThreadContext context )
Java: inspect(org.jruby.runtime.ThreadContext context)

lstat

IRubyObject lstat ( ThreadContext context )
Java: lstat(org.jruby.runtime.ThreadContext context)

mtime

IRubyObject mtime ( ThreadContext context )
Java: mtime(org.jruby.runtime.ThreadContext context)

path

IRubyObject path ( ThreadContext context )
Java: path(org.jruby.runtime.ThreadContext context)

size

IRubyObject size ( ThreadContext context )
Java: size(org.jruby.runtime.ThreadContext context)

to_java

T to_java ( Class<T> target )
Java: toJava(Class<T> target)

to_string

String to_string ( )
Java: toString()

truncate

IRubyObject truncate ( ThreadContext context, IRubyObject len )
Java: truncate(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject len)

Inherited

from IRubyObject

fieldtypenote
NULL_ARRAY IRubyObject[]

check_string_type19

IRubyObject check_string_type19 ( )
Java: checkStringType19()
Deprecated. Use #checkStringType() instead.

is this a string?

Returns: the string if so

dup

IRubyObject dup ( ThreadContext context )
Java: dup(org.jruby.runtime.ThreadContext context)

RubyMethod dup.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context

Returns: a dup-ed object

marshal_live_variables

marshal_live_variables ( MarshalDumper stream, ThreadContext context, RubyOutputStream out )
Java: marshalLiveVariables(org.jruby.runtime.marshal.MarshalDumper stream, org.jruby.runtime.ThreadContext context, org.jruby.util.io.RubyOutputStream out)

from RubyBasicObject

fieldtypenote
ALL_F int
BASICOBJECT_ALLOCATOR ObjectAllocator Default allocator instance for all Ruby objects. The only reason to not use this allocator is if you actually need to have all instances of something be a subclass of RubyObject.
COMPARE_BY_IDENTITY_F int
ERR_INSECURE_SET_INST_VAR String The error message used when some one tries to modify an instance variable in a high security setting.
FALSE_F int
FL_USHIFT int
FROZEN_F int
IS_OVERLAID_F int
NEVER IRubyObject A value that is used as a null sentinel in among other places the RubyArray implementation. It will cause large problems to call any methods on this object.
NIL_F int This flag is a bit funny. It's used to denote that this value is nil. It's a bit counterintuitive for a Java programmer to not use subclassing to handle this case, since we have a RubyNil subclass anyway. Well, the reason for it being a flag is that the #isNil() method is called extremely often. So often that it gives a good speed boost to make it monomorphic and final. It turns out using a flag for this actually gives us better performance than having a polymorphic #isNil() method.
REFINED_MODULE_F int
STAMP_OFFSET long
TAINTED_F int
UNDEF IRubyObject A value that specifies an undefined value. This value is used as a sentinel for undefined constant values, and other places where neither null nor NEVER makes sense.
USER0_F int
USER1_F int
USER2_F int
USER3_F int
USER4_F int
USER5_F int
USER6_F int
USER7_F int
USER8_F int
USER9_F int
USERA_F int
VAR_TABLE_OFFSET long
varTable Object[] variable table, lazily allocated as needed (if needed)
varTableStamp int locking stamp for Unsafe ops updating the vartable

__id__

RubyInteger __id__ ( ThreadContext context )
Java: __id__(org.jruby.runtime.ThreadContext context)

rb_obj_id Return the internal id of an object.

add_finalizer

add_finalizer ( IRubyObject f )
Java: addFinalizer(org.jruby.runtime.builtin.IRubyObject f)

add_finalizer

IRubyObject add_finalizer ( ThreadContext context, IRubyObject f )
Java: addFinalizer(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject f)

Adds the specified object as a finalizer for this object.

any_to_string

IRubyObject any_to_string ( )
Java: anyToString()

Internal method that helps to convert any object into the format of a class name and a hex string inside of #<>.

as_java_string

String as_java_string ( )
Java: asJavaString()

rb_to_id Will try to convert this object to a String using the Ruby "to_str" if the object isn't already a String. If this still doesn't work, will throw a Ruby TypeError.

Returns: a (Java) string

as_string

RubyString as_string ( )
Java: asString()

rb_obj_as_string First converts this object into a String using the "to_s" method and returns it. If to_s doesn't return a Ruby String, Convert#anyToString is used instead.

call_method

IRubyObject call_method ( ThreadContext context, String name )
Java: callMethod(org.jruby.runtime.ThreadContext context, String name)

Will invoke a named method with no arguments and no block.

call_method

IRubyObject call_method ( ThreadContext context, String name, IRubyObject arg )
Java: callMethod(org.jruby.runtime.ThreadContext context, String name, org.jruby.runtime.builtin.IRubyObject arg)

Will invoke a named method with one argument and no block with functional invocation.

call_method

IRubyObject call_method ( ThreadContext context, String name, IRubyObject[] args )
Java: callMethod(org.jruby.runtime.ThreadContext context, String name, org.jruby.runtime.builtin.IRubyObject[] args)

Will invoke a named method with the supplied arguments and no block with functional invocation.

call_method

IRubyObject call_method ( String name, IRubyObject[] args )
Java: callMethod(String name, org.jruby.runtime.builtin.IRubyObject[] args)

call_method

IRubyObject call_method ( String name, IRubyObject arg )
Java: callMethod(String name, org.jruby.runtime.builtin.IRubyObject arg)

call_method

IRubyObject call_method ( String name )
Java: callMethod(String name)

call_method

IRubyObject call_method ( ThreadContext context, String name, IRubyObject[] args, Block block )
Java: callMethod(org.jruby.runtime.ThreadContext context, String name, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

Will invoke a named method with the supplied arguments and supplied block with functional invocation.

call_method

IRubyObject call_method ( ThreadContext context, int method_index, String name )
Java: callMethod(org.jruby.runtime.ThreadContext context, int methodIndex, String name)

call_method

IRubyObject call_method ( ThreadContext context, int method_index, String name, IRubyObject arg )
Java: callMethod(org.jruby.runtime.ThreadContext context, int methodIndex, String name, org.jruby.runtime.builtin.IRubyObject arg)

call_super

IRubyObject call_super ( ThreadContext context, IRubyObject[] args, Block block )
Java: callSuper(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

check_array_type

IRubyObject check_array_type ( )
Java: checkArrayType()

rb_check_array_type Returns the result of trying to convert this object to an Array with "to_ary".

check_call_method

IRubyObject check_call_method ( ThreadContext context, String name )
Java: checkCallMethod(org.jruby.runtime.ThreadContext context, String name)

Will invoke a named method with no arguments and no block if that method or a custom method missing exists. Otherwise returns null. 1.9: rb_check_funcall

check_call_method

IRubyObject check_call_method ( ThreadContext context, JavaSites.CheckedSites sites )
Java: checkCallMethod(org.jruby.runtime.ThreadContext context, org.jruby.runtime.JavaSites.CheckedSites sites)

Will invoke a named method with no arguments and no block if that method or a custom method missing exists. Otherwise returns null. 1.9: rb_check_funcall

check_frozen

check_frozen ( )
Java: checkFrozen()

The actual method that checks frozen with the default frozen message from MRI. If possible, call this instead of #testFrozen.

check_string_type

IRubyObject check_string_type ( )
Java: checkStringType()

rb_check_string_type Tries to return a coerced string representation of this object, using "to_str". If that returns something other than a String or nil, an empty String will be returned.

class?

boolean class? ( )
Java: isClass() · also: is_class

Specifically polymorphic method that are meant to be overridden by classes to specify that they are classes in an easy way.

compare_to

int compare_to ( IRubyObject other )
Java: compareTo(org.jruby.runtime.builtin.IRubyObject other)

Compares this Ruby object with another.

nametypedescription
otherorg.jruby.runtime.builtin.IRubyObjectanother IRubyObject

Returns: 0 if equal, < 0 if this is less than other, > 0 if this is greater than other

convert_to_array

RubyArray convert_to_array ( )
Java: convertToArray()

Tries to convert this object to a Ruby Array using the "to_ary" method.

Returns: array representation of this

convert_to_float

RubyFloat convert_to_float ( )
Java: convertToFloat()

Tries to convert this object to a Ruby Float using the "to_f" method.

Returns: float representation of this

convert_to_hash

RubyHash convert_to_hash ( )
Java: convertToHash()

Tries to convert this object to a Ruby Hash using the "to_hash" method.

Returns: hash representation of this

convert_to_integer

RubyInteger convert_to_integer ( )
Java: convertToInteger()

Tries to convert this object to a Ruby Integer using the "to_int" method.

Returns: an integer representation of this

convert_to_integer

RubyInteger convert_to_integer ( String convert_method )
Java: convertToInteger(String convertMethod)

Tries to convert this object to a Ruby Integer using the supplied conversion method.

nametypedescription
convert_methodStringconversion method to use e.g. "to_i"

Returns: an integer representation of this

convert_to_integer

RubyInteger convert_to_integer ( int method_index, String convert_method )
Java: convertToInteger(int methodIndex, String convertMethod)

convert_to_string

RubyString convert_to_string ( )
Java: convertToString()

Tries to convert this object to a Ruby String using the "to_str" method.

Returns: a string representation of this

copy_instance_variables_into

copy_instance_variables_into ( InstanceVariables other )
Java: copyInstanceVariablesInto(org.jruby.runtime.builtin.InstanceVariables other)

copy_special_instance_variables

copy_special_instance_variables ( IRubyObject clone )
Java: copySpecialInstanceVariables(org.jruby.runtime.builtin.IRubyObject clone)

Lots of MRI objects keep their state in non-lookupable ivars (e:g. Range, Struct, etc). This method is responsible for dupping our java field equivalents

current_context

ThreadContext current_context ( )
Java: getCurrentContext() · also: get_current_context

data_get_struct

Object data_get_struct ( )
Java: dataGetStruct()

data_get_struct_checked

Object data_get_struct_checked ( )
Java: dataGetStructChecked()

data_wrap_struct

data_wrap_struct ( Object obj )
Java: dataWrapStruct(Object obj)

decode

RubyString decode ( String id )
Java: decode(String id)

raw (id) strings are not properly encoded but in an iso_8859_1 form. This method will lookup properly encoded string from the symbol table.

nametypedescription
idStringthe id of the string

Returns: the string of the symbol found from id

display

IRubyObject display ( ThreadContext context, IRubyObject[] args )
Java: display(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

dup

IRubyObject dup ( )
Java: dup()

ensure_instance_variables_settable

ensure_instance_variables_settable ( )
Java: ensureInstanceVariablesSettable()

Makes sure that instance variables can be set on this object, including information about whether this object is frozen. Will throw a suitable exception in that case.

eql

boolean eql ( IRubyObject other )
Java: eql(org.jruby.runtime.builtin.IRubyObject other)

method used for Hash key comparison (specialized for String, Symbol and Fixnum)

Returns: Will by default just call the Ruby method "eql?"

eql_p

IRubyObject eql_p ( IRubyObject obj )
Java: eql_p(org.jruby.runtime.builtin.IRubyObject obj)

eql_p

IRubyObject eql_p ( ThreadContext context, IRubyObject obj )
Java: eql_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject obj)

equal_p

IRubyObject equal_p ( ThreadContext context, IRubyObject other )
Java: equal_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject other)

rb_obj_equal Will use Java identity equality.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
otherorg.jruby.runtime.builtin.IRubyObjectto compare with

Returns: are they equal?

eval_under

IRubyObject eval_under ( ThreadContext context, RubyModule under, RubyString src, String file, int line, EvalType eval_type )
Java: evalUnder(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule under, org.jruby.RubyString src, String file, int line, org.jruby.EvalType evalType)

extend

IRubyObject extend ( IRubyObject[] args )
Java: extend(org.jruby.runtime.builtin.IRubyObject[] args)

rb_obj_extend call-seq: obj.extend(module, ...) => obj Adds to _obj_ the instance methods from each module given as a parameter. module Mod def hello "Hello from Mod.\n" end end class Klass def hello "Hello from Klass.\n" end end k = Klass.new k.hello #=> "Hello from Klass.\n" k.extend(Mod) #=> #<Klass:0x401b3bc8> k.hello #=> "Hello from Mod.\n"

nametypedescription
argsorg.jruby.runtime.builtin.IRubyObject[]to use as modules to extend

Returns: itself

false?

boolean false? ( )
Java: isFalse() · also: is_false

Is this value a falsey value or not? Based on the #FALSE_F flag.

Returns: true is false

fast_get_instance_variable

IRubyObject fast_get_instance_variable ( String interned_name )
Java: fastGetInstanceVariable(String internedName)

fast_get_internal_variable

Object fast_get_internal_variable ( String interned_name )
Java: fastGetInternalVariable(String internedName)

fast_has_instance_variable

boolean fast_has_instance_variable ( String interned_name )
Java: fastHasInstanceVariable(String internedName)

fast_has_internal_variable

boolean fast_has_internal_variable ( String interned_name )
Java: fastHasInternalVariable(String internedName)

fast_set_instance_variable

IRubyObject fast_set_instance_variable ( String interned_name, IRubyObject value )
Java: fastSetInstanceVariable(String internedName, org.jruby.runtime.builtin.IRubyObject value)

fast_set_internal_variable

fast_set_internal_variable ( String interned_name, Object value )
Java: fastSetInternalVariable(String internedName, Object value)

ffi_handle

Object ffi_handle ( )
Java: getFFIHandle() · also: get_ffi_handle

ffi_handle=

ffi_handle= ( Object value )
Java: setFFIHandle(Object value) · also: set_ffi_handle

for_each_instance_variable

for_each_instance_variable ( BiConsumer<String,IRubyObject> accessor )
Java: forEachInstanceVariable(java.util.function.BiConsumer<String,org.jruby.runtime.builtin.IRubyObject> accessor)

for_each_instance_variable_name

for_each_instance_variable_name ( Consumer<String> consumer )
Java: forEachInstanceVariableName(java.util.function.Consumer<String> consumer)

freeze

IRubyObject freeze ( ThreadContext context )
Java: freeze(org.jruby.runtime.ThreadContext context)

frozen=

frozen= ( boolean frozen )
Java: setFrozen(boolean frozen) · also: set_frozen

Sets whether this object is frozen or not. Shortcut for doing setFlag(FROZEN_F, frozen).

nametypedescription
frozenbooleanshould this object be frozen?

frozen?

boolean frozen? ( )
Java: isFrozen() · also: is_frozen

Is this value frozen or not? Shortcut for doing getFlag(FROZEN_F).

Returns: true if this object is frozen, false otherwise

frozen_p

RubyBoolean frozen_p ( ThreadContext context )
Java: frozen_p(org.jruby.runtime.ThreadContext context)

get_flag

boolean get_flag ( int flag )
Java: getFlag(int flag)

Get the value of a custom flag on this object. The only guaranteed flags that can be sent in to this method is:

  • #FALSE_F
  • #NIL_F
  • #FROZEN_F

nametypedescription
flagintthe flag to get

Returns: true if the flag is set, false otherwise

get_instance_variable

IRubyObject get_instance_variable ( String name )
Java: getInstanceVariable(String name)

get_internal_variable

Object get_internal_variable ( String name )
Java: getInternalVariable(String name)

get_variable

Object get_variable ( int index )
Java: getVariable(int index)

has_instance_variable

boolean has_instance_variable ( String name )
Java: hasInstanceVariable(String name)

has_internal_variable

boolean has_internal_variable ( String name )
Java: hasInternalVariable(String name)

has_variables?

boolean has_variables? ( )
Java: hasVariables() · also: has_variables

Returns true if object has any variables

hash

RubyFixnum hash ( )
Java: hash()
Deprecated. Use RubyBasicObject#hash(ThreadContext) instead.

Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

Returns: hash value

hash

RubyFixnum hash ( ThreadContext context )
Java: hash(org.jruby.runtime.ThreadContext context)

Will return the hash code of this object. In comparison to MRI, this method will use the Java identity hash code instead of using rb_obj_id, since the usage of id in JRuby will incur the cost of some. ObjectSpace maintenance.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current thread context

Returns: the hash value

hashy_inspect

IRubyObject hashy_inspect ( )
Java: hashyInspect()

id

IRubyObject id ( )
Java: id()

immediate?

boolean immediate? ( )
Java: isImmediate() · also: is_immediate

Is object immediate (def: Fixnum, Symbol, true, false, nil?).

infect_by

IRubyObject infect_by ( IRubyObject obj )
Java: infectBy(org.jruby.runtime.builtin.IRubyObject obj)

initialize

IRubyObject initialize ( ThreadContext context )
Java: initialize(org.jruby.runtime.ThreadContext context)

initialize_copy

IRubyObject initialize_copy ( IRubyObject original )
Java: initialize_copy(org.jruby.runtime.builtin.IRubyObject original)
Deprecated. Use org.jruby.RubyBasicObject#initialize_copy(ThreadContext, IRubyObject) instead.
nametypedescription
originalorg.jruby.runtime.builtin.IRubyObjectobject

Returns: a copy

inspect

IRubyObject inspect ( )
Java: inspect()

instance_eval

IRubyObject instance_eval ( ThreadContext context, Block block )
Java: instance_eval(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

instance_eval

IRubyObject instance_eval ( ThreadContext context, IRubyObject arg0, Block block )
Java: instance_eval(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

instance_eval

IRubyObject instance_eval ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block )
Java: instance_eval(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

instance_eval

IRubyObject instance_eval ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: instance_eval(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

instance_eval

IRubyObject instance_eval ( ThreadContext context, IRubyObject[] args, Block block )
Java: instance_eval(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

instance_exec

IRubyObject instance_exec ( ThreadContext context, IRubyObject[] args, Block block )
Java: instance_exec(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

rb_obj_instance_exec call-seq: obj.instance_exec(arg...) {|var...| block } => obj Executes the given block within the context of the receiver (_obj_). In order to set the context, the variable +self+ is set to _obj_ while the code is executing, giving the code access to _obj_'s instance variables. Arguments are passed as block parameters. class Klass def initialize @secret = 99 end end k = Klass.new k.instance_exec(5) {|x| @secret+x } #=> 104

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
argsorg.jruby.runtime.builtin.IRubyObject[]the args
blockorg.jruby.runtime.Blockblock

Returns: the result

instance_of_p

RubyBoolean instance_of_p ( ThreadContext context, IRubyObject type )
Java: instance_of_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject type)

rb_obj_is_instance_of call-seq: obj.instance_of?(class) => true or false Returns true if obj is an instance of the given class. See also Object#kind_of?.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
typeorg.jruby.runtime.builtin.IRubyObjectthe type

Returns: true if this is instance of type

instance_variable_defined_p

IRubyObject instance_variable_defined_p ( ThreadContext context, IRubyObject name )
Java: instance_variable_defined_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject name)

rb_obj_ivar_defined call-seq: obj.instance_variable_defined?(symbol) => true or false Returns true if the given instance variable is defined in obj. class Fred def initialize(p1, p2) @a, @b = p1, p2 end end fred = Fred.new('cat', 99) fred.instance_variable_defined?(:@a) #=> true fred.instance_variable_defined?("@b") #=> true fred.instance_variable_defined?("@c") #=> false

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
nameorg.jruby.runtime.builtin.IRubyObjectof ivar

Returns: true if defined

instance_variable_get

IRubyObject instance_variable_get ( ThreadContext context, IRubyObject name )
Java: instance_variable_get(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject name)

rb_obj_ivar_get call-seq: obj.instance_variable_get(symbol) => obj Returns the value of the given instance variable, or nil if the instance variable is not set. The @ part of the variable name should be included for regular instance variables. Throws a NameError exception if the supplied symbol is not valid as an instance variable name. class Fred def initialize(p1, p2) @a, @b = p1, p2 end end fred = Fred.new('cat', 99) fred.instance_variable_get(:@a) #=> "cat" fred.instance_variable_get("@b") #=> 99

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
nameorg.jruby.runtime.builtin.IRubyObjectof ivar

Returns: value of ivar

instance_variable_list

List<Variable<IRubyObject>> instance_variable_list ( )
Java: getInstanceVariableList() · also: get_instance_variable_list

Gets a list of all variables in this object.

instance_variable_name_list

List<String> instance_variable_name_list ( )
Java: getInstanceVariableNameList() · also: get_instance_variable_name_list

Gets a name list of all variables in this object.

instance_variable_set

IRubyObject instance_variable_set ( IRubyObject name, IRubyObject value )
Java: instance_variable_set(org.jruby.runtime.builtin.IRubyObject name, org.jruby.runtime.builtin.IRubyObject value)

rb_obj_ivar_set call-seq: obj.instance_variable_set(symbol, obj) => obj Sets the instance variable names by symbol to object, thereby frustrating the efforts of the class's author to attempt to provide proper encapsulation. The variable did not have to exist prior to this call. class Fred def initialize(p1, p2) @a, @b = p1, p2 end end fred = Fred.new('cat', 99) fred.instance_variable_set(:@a, 'dog') #=> "dog" fred.instance_variable_set(:@c, 'cat') #=> "cat" fred.inspect #=> "#<Fred:0x401b3da8 @a=\"dog\", @b=99, @c=\"cat\">"

nametypedescription
nameorg.jruby.runtime.builtin.IRubyObjectof ivar
valueorg.jruby.runtime.builtin.IRubyObjectto set

Returns: value of old set ivar

instance_variables

InstanceVariables instance_variables ( )
Java: getInstanceVariables() · also: get_instance_variables

Dummy method to avoid a cast, and to avoid polluting the IRubyObject interface with all the instance variable management methods.

instance_variables

RubyArray instance_variables ( ThreadContext context )
Java: instance_variables(org.jruby.runtime.ThreadContext context)

rb_obj_instance_variables call-seq: obj.instance_variables => array Returns an array of instance variable names for the receiver. Note that simply defining an accessor does not create the corresponding instance variable. class Fred attr_accessor :a1 def initialize @iv = 3 end end Fred.new.instance_variables #=> [:"@iv"]

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context

Returns: list of ivars

internal_variables

InternalVariables internal_variables ( )
Java: getInternalVariables() · also: get_internal_variables

Dummy method to avoid a cast, and to avoid polluting the IRubyObject interface with all the instance variable management methods.

is_builtin

boolean is_builtin ( String method_name )
Java: isBuiltin(String methodName)

A method to determine whether the method named by methodName is a builtin method, i.e. a method built-in to JRuby and loaded during its core boot process.

nametypedescription
method_nameStringto look for.

Returns: true if so

java_class

Class<?> java_class ( )
Java: getJavaClass() · also: get_java_class

Will return the Java interface that most closely can represent this object, when working through Java integration translations.

Returns: the true Java class of this (Ruby) object

kind_of_p

RubyBoolean kind_of_p ( ThreadContext context, IRubyObject type )
Java: kind_of_p(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject type)

rb_obj_is_kind_of call-seq: obj.is_a?(class) => true or false obj.kind_of?(class) => true or false Returns true if class is the class of obj, or if class is one of the superclasses of obj or modules included in obj. module M; end class A include M end class B < A; end class C < B; end b = B.new b.instance_of? A #=> false b.instance_of? B #=> true b.instance_of? C #=> false b.instance_of? M #=> false b.kind_of? A #=> true b.kind_of? B #=> true b.kind_of? C #=> false b.kind_of? M #=> true

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
typeorg.jruby.runtime.builtin.IRubyObjectthe type

Returns: true if this is kind of type

make_meta_class

RubyClass make_meta_class ( RubyClass super_class )
Java: makeMetaClass(org.jruby.RubyClass superClass)

make_meta_class

RubyClass make_meta_class ( ThreadContext context, RubyClass super_class )
Java: makeMetaClass(org.jruby.runtime.ThreadContext context, org.jruby.RubyClass superClass)

rb_make_metaclass Will create a new meta class, insert this in the chain of classes for this specific object, and return the generated meta class.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
super_classorg.jruby.RubyClassthe super class

Returns: the new meta class

make_meta_class_bootstrap

RubyClass make_meta_class_bootstrap ( Ruby runtime, RubyClass super_class, RubyClass class )
Java: makeMetaClassBootstrap(org.jruby.Ruby runtime, org.jruby.RubyClass superClass, org.jruby.RubyClass Class)

This will create a new metaclass. This is only used during bootstrapping before the initial ThreadContext is defined. Normal needs of making a metaclass should use RubyBasicObject#makeMetaClass(ThreadContext, RubyClass)

nametypedescription
runtimeorg.jruby.Rubythe runtime
super_classorg.jruby.RubyClassof the metaclass
classorg.jruby.RubyClassa reference to Ruby Class

Returns: the new metaclass

marshal_variable_list

List<Variable<Object>> marshal_variable_list ( )
Java: getMarshalVariableList() · also: get_marshal_variable_list

meta_class

RubyClass meta_class ( )
Java: getMetaClass() · also: get_meta_class

if exist return the meta-class else return the type of the object.

meta_class=

meta_class= ( RubyClass meta_class )
Java: setMetaClass(org.jruby.RubyClass metaClass) · also: set_meta_class

Makes it possible to change the metaclass of an object. In practice, this is a simple version of Smalltalks Become, except that it doesn't work when we're dealing with subclasses. In practice it's used to change the singleton/meta class used, without changing the "real" inheritance chain.

nametypedescription
meta_classorg.jruby.RubyClassthe meta class to set

method

IRubyObject method ( IRubyObject name )
Java: method(org.jruby.runtime.builtin.IRubyObject name)

method

IRubyObject method ( IRubyObject name, StaticScope refined_scope )
Java: method(org.jruby.runtime.builtin.IRubyObject name, org.jruby.parser.StaticScope refinedScope)

method

IRubyObject method ( ThreadContext context, IRubyObject name, StaticScope refined_scope )
Java: method(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject name, org.jruby.parser.StaticScope refinedScope)

Like #method(IRubyObject) but using the given refinement scope to search for the method.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
nameorg.jruby.runtime.builtin.IRubyObjectthe name of the method
refined_scopeorg.jruby.parser.StaticScopethe static scope for the caller method

Returns: method instance

methods

IRubyObject methods ( ThreadContext context, IRubyObject[] args )
Java: methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

rb_obj_methods call-seq: obj.methods => array Returns a list of the names of methods publicly accessible in obj. This will include all the methods accessible in obj's ancestors. class Klass def kMethod() end end k = Klass.new k.methods[0..9] #=> ["kMethod", "freeze", "nil?", "is_a?", "class", "instance_variable_set", "methods", "extend", "__send__", "instance_eval"] k.methods.length #=> 42

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
argsorg.jruby.runtime.builtin.IRubyObject[]include ancestors

Returns: methods

methods

IRubyObject methods ( ThreadContext context, IRubyObject[] args, boolean use_symbols )
Java: methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, boolean useSymbols)

module?

boolean module? ( )
Java: isModule() · also: is_module

Specifically polymorphic method that are meant to be overridden by modules to specify that they are modules in an easy way.

native_handle

Object native_handle ( )
Java: getNativeHandle() · also: get_native_handle

native_handle=

native_handle= ( Object value )
Java: setNativeHandle(Object value) · also: set_native_handle

native_type_index

int native_type_index ( )
Java: getNativeTypeIndex() · also: get_native_type_index

nil?

boolean nil? ( )
Java: isNil() · also: is_nil

Does this object represent nil? See the docs for the #NIL_F flag for more information.

nil_p

IRubyObject nil_p ( ThreadContext context )
Java: nil_p(org.jruby.runtime.ThreadContext context)

rb_false call_seq: nil.nil? => true <anything_else>.nil? => false Only the object nil responds true to nil?.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context

Returns: true if nil

op_cmp

IRubyObject op_cmp ( ThreadContext context, IRubyObject other )
Java: op_cmp(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject other)

op_equal

IRubyObject op_equal ( ThreadContext context, IRubyObject obj )
Java: op_equal(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject obj)

rb_obj_equal Will by default use identity equality to compare objects. This follows the Ruby semantics. The name of this method doesn't follow the convention because hierarchy problems

op_match

IRubyObject op_match ( ThreadContext context, IRubyObject arg )
Java: op_match(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg)

rb_obj_pattern_match call-seq: obj =~ other => nil Pattern Match---Overridden by descendents (notably Regexp and String) to provide meaningful pattern-match semantics.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
argorg.jruby.runtime.builtin.IRubyObjectarg

Returns: true if matches (always nil)

op_not

IRubyObject op_not ( ThreadContext context )
Java: op_not(org.jruby.runtime.ThreadContext context)

op_not_equal

IRubyObject op_not_equal ( ThreadContext context, IRubyObject other )
Java: op_not_equal(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject other)

The != method implemented for BasicObject.

nametypedescription
contextorg.jruby.runtime.ThreadContextthread context
otherorg.jruby.runtime.builtin.IRubyObjectother object

Returns: false if this == other, true otherwise

op_not_match

IRubyObject op_not_match ( ThreadContext context, IRubyObject arg )
Java: op_not_match(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg)

Invert the match operator.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
argorg.jruby.runtime.builtin.IRubyObjectarg

Returns: true if they do not match

private_methods

IRubyObject private_methods ( ThreadContext context, IRubyObject[] args )
Java: private_methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

protected_methods

IRubyObject protected_methods ( ThreadContext context, IRubyObject[] args )
Java: protected_methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

public_methods

IRubyObject public_methods ( ThreadContext context, IRubyObject[] args )
Java: public_methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

rb_clone

IRubyObject rb_clone ( )
Java: rbClone()

rb_clone

IRubyObject rb_clone ( ThreadContext context, IRubyObject maybe_opts )
Java: rbClone(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject maybeOpts)

remove_finalizers

remove_finalizers ( )
Java: removeFinalizers()

Remove all the finalizers for this object.

remove_instance_variable

IRubyObject remove_instance_variable ( String name )
Java: removeInstanceVariable(String name)

remove_instance_variable

IRubyObject remove_instance_variable ( ThreadContext context, IRubyObject name, Block block )
Java: remove_instance_variable(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject name, org.jruby.runtime.Block block)

rb_obj_remove_instance_variable call-seq: obj.remove_instance_variable(symbol) => obj Removes the named instance variable from obj, returning that variable's value. class Dummy attr_reader :var def initialize @var = 99 end def remove remove_instance_variable(:@var) end end d = Dummy.new d.var #=> 99 d.remove #=> 99 d.var #=> nil

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
nameorg.jruby.runtime.builtin.IRubyObjectof ivar
blockorg.jruby.runtime.Blockthe block (not used)

Returns: value of removed ivar

remove_internal_variable

Object remove_internal_variable ( String name )
Java: removeInternalVariable(String name)

respond_to_p

RubyBoolean respond_to_p ( IRubyObject mname )
Java: respond_to_p(org.jruby.runtime.builtin.IRubyObject mname)

respond_to_p

RubyBoolean respond_to_p ( IRubyObject mname, IRubyObject include_private )
Java: respond_to_p(org.jruby.runtime.builtin.IRubyObject mname, org.jruby.runtime.builtin.IRubyObject includePrivate)

responds_to

boolean responds_to ( String name )
Java: respondsTo(String name)

Does this object respond to the specified message? Uses a shortcut if it can be proved that respond_to? and respond_to_missing? haven't been overridden.

responds_to_missing

boolean responds_to_missing ( String name )
Java: respondsToMissing(String name)

Does this object respond to the specified message via "method_missing?"

responds_to_missing

boolean responds_to_missing ( String name, boolean inc_private )
Java: respondsToMissing(String name, boolean incPrivate)

Does this object respond to the specified message via "method_missing?"

runtime

Ruby runtime ( )
Java: getRuntime() · also: get_runtime

Will return the runtime that this object is associated with.

Returns: current runtime

send

IRubyObject send ( ThreadContext context, Block block )
Java: send(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

send

IRubyObject send ( ThreadContext context, IRubyObject arg0, Block block )
Java: send(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

send

IRubyObject send ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block )
Java: send(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

send

IRubyObject send ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: send(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

send

IRubyObject send ( ThreadContext context, IRubyObject[] args, Block block )
Java: send(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

set_flag

set_flag ( int flag, boolean set )
Java: setFlag(int flag, boolean set)

Sets or unsets a flag on this object. The only flags that are guaranteed to be valid to use as the first argument is:

  • #FALSE_F
  • #NIL_F
  • #FROZEN_F

nametypedescription
flagintthe actual flag to set or unset.
setbooleanif true, the flag will be set, if false, the flag will be unset.

set_instance_variable

IRubyObject set_instance_variable ( String name, IRubyObject value )
Java: setInstanceVariable(String name, org.jruby.runtime.builtin.IRubyObject value)

rb_iv_set / rb_ivar_set

set_internal_variable

set_internal_variable ( String name, Object value )
Java: setInternalVariable(String name, Object value)

set_variable

set_variable ( int index, Object value )
Java: setVariable(int index, Object value)

singleton_class

RubyClass singleton_class ( )
Java: getSingletonClass() · also: get_singleton_class

singleton_class

RubyClass singleton_class ( ThreadContext context )
Java: singletonClass(org.jruby.runtime.ThreadContext context)

Will either return the existing singleton class for this object, or create a new one and return that. For a few types a singleton class is not possible so it will throw an error.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current thread context

Returns: the singleton of this type

singleton_method

IRubyObject singleton_method ( IRubyObject name )
Java: singleton_method(org.jruby.runtime.builtin.IRubyObject name)

singleton_method

IRubyObject singleton_method ( ThreadContext context, IRubyObject name )
Java: singleton_method(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject name)

singleton_methods

RubyArray singleton_methods ( ThreadContext context, IRubyObject[] args )
Java: singleton_methods(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

special_const?

boolean special_const? ( )
Java: isSpecialConst() · also: is_special_const

special_object?

boolean special_object? ( )
Java: isSpecialObject() · also: is_special_object

specific_eval

IRubyObject specific_eval ( ThreadContext context, RubyModule mod, Block block, EvalType eval_type )
Java: specificEval(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule mod, org.jruby.runtime.Block block, org.jruby.EvalType evalType)

specific_eval Evaluates the block or string inside of the context of this object, using the supplied arguments. If a block is given, this will be yielded in the specific context of this object. If no block is given then a String-like object needs to be the first argument, and this string will be evaluated. Second and third arguments in the args-array is optional, but can contain the filename and line of the string under evaluation.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
modorg.jruby.RubyModulemodule to yield in
blockorg.jruby.runtime.Blockto call
eval_typeorg.jruby.EvalTypetype of evaal to perform

Returns: the result

specific_eval

IRubyObject specific_eval ( ThreadContext context, RubyModule mod, IRubyObject arg, Block block, EvalType eval_type )
Java: specificEval(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule mod, org.jruby.runtime.builtin.IRubyObject arg, org.jruby.runtime.Block block, org.jruby.EvalType evalType)

specific_eval Evaluates the block or string inside of the context of this object, using the supplied arguments. If a block is given, this will be yielded in the specific context of this object. If no block is given then a String-like object needs to be the first argument, and this string will be evaluated. Second and third arguments in the args-array is optional, but can contain the filename and line of the string under evaluation.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
modorg.jruby.RubyModulemodule to yield in
argorg.jruby.runtime.builtin.IRubyObjectto pass to block
blockorg.jruby.runtime.Blockto call
eval_typeorg.jruby.EvalTypetype of evaal to perform

Returns: the result

specific_eval

IRubyObject specific_eval ( ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, Block block, EvalType eval_type )
Java: specificEval(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule mod, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block, org.jruby.EvalType evalType)

specific_eval Evaluates the block or string inside of the context of this object, using the supplied arguments. If a block is given, this will be yielded in the specific context of this object. If no block is given then a String-like object needs to be the first argument, and this string will be evaluated. Second and third arguments in the args-array is optional, but can contain the filename and line of the string under evaluation.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
modorg.jruby.RubyModulemodule to yield in
arg0org.jruby.runtime.builtin.IRubyObjectto pass to block
arg1org.jruby.runtime.builtin.IRubyObjectto pass to block
blockorg.jruby.runtime.Blockto call
eval_typeorg.jruby.EvalTypetype of evaal to perform

Returns: the result

specific_eval

IRubyObject specific_eval ( ThreadContext context, RubyModule mod, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block, EvalType eval_type )
Java: specificEval(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule mod, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block, org.jruby.EvalType evalType)

specific_eval Evaluates the block or string inside of the context of this object, using the supplied arguments. If a block is given, this will be yielded in the specific context of this object. If no block is given then a String-like object needs to be the first argument, and this string will be evaluated. Second and third arguments in the args-array is optional, but can contain the filename and line of the string under evaluation.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe thread context
modorg.jruby.RubyModulemodule to yield in
arg0org.jruby.runtime.builtin.IRubyObjectto pass to block
arg1org.jruby.runtime.builtin.IRubyObjectto pass to block
arg2org.jruby.runtime.builtin.IRubyObjectto pass to block
blockorg.jruby.runtime.Blockto call
eval_typeorg.jruby.EvalTypetype of evaal to perform

Returns: the result

sync_variables

sync_variables ( IRubyObject other )
Java: syncVariables(org.jruby.runtime.builtin.IRubyObject other)

Sync one this object's variables with other's - this is used to make rbClone work correctly.

sync_variables

sync_variables ( List<Variable<Object>> variables )
Java: syncVariables(List<org.jruby.runtime.builtin.Variable<Object>> variables)

taint

IRubyObject taint ( ThreadContext context )
Java: taint(org.jruby.runtime.ThreadContext context)

taint=

taint= ( boolean taint )
Java: setTaint(boolean taint) · also: set_taint

taint?

boolean taint? ( )
Java: isTaint() · also: is_taint

tainted_p

RubyBoolean tainted_p ( ThreadContext context )
Java: tainted_p(org.jruby.runtime.ThreadContext context)

to_a

RubyArray to_a ( ThreadContext context )
Java: to_a(org.jruby.runtime.ThreadContext context)

to_a

RubyArray to_a ( )
Java: to_a()

to_s

IRubyObject to_s ( )
Java: to_s()
Deprecated. Use RubyBasicObject#to_s(ThreadContext) instead.

Returns: ""

to_s

IRubyObject to_s ( ThreadContext context )
Java: to_s(org.jruby.runtime.ThreadContext context)

true?

boolean true? ( )
Java: isTrue() · also: is_true

Is this value a truthy value or not? Based on the #FALSE_F flag.

Returns: true it truthy

trust

IRubyObject trust ( ThreadContext context )
Java: trust(org.jruby.runtime.ThreadContext context)

type

RubyClass type ( )
Java: getType() · also: get_type

type

RubyClass type ( )
Java: type()

rb_obj_class Returns the real class of this object, excluding any singleton/meta class in the inheritance chain.

Returns: the real class

untaint

IRubyObject untaint ( ThreadContext context )
Java: untaint(org.jruby.runtime.ThreadContext context)

untrust

IRubyObject untrust ( ThreadContext context )
Java: untrust(org.jruby.runtime.ThreadContext context)

untrusted=

untrusted= ( boolean untrusted )
Java: setUntrusted(boolean untrusted) · also: set_untrusted

untrusted?

boolean untrusted? ( )
Java: isUntrusted() · also: is_untrusted

untrusted_p

RubyBoolean untrusted_p ( ThreadContext context )
Java: untrusted_p(org.jruby.runtime.ThreadContext context)

variable_count

int variable_count ( )
Java: getVariableCount() · also: get_variable_count

variable_list

List<Variable<Object>> variable_list ( )
Java: getVariableList() · also: get_variable_list

Gets a list of all variables in this object.

variable_name_list

List<String> variable_name_list ( )
Java: getVariableNameList() · also: get_variable_name_list

Gets a name list of all variables in this object.

from RubyObject

fieldtypenote
IVAR_INSPECTING_OBJECT_ALLOCATOR ObjectAllocator Allocator that inspects all methods for instance variables and chooses a concrete class to construct based on that. This allows using specialized subclasses to hold instance variables in fields rather than always holding them in an array.
OBJECT_ALLOCATOR ObjectAllocator Default allocator instance for all Ruby objects. The only reason to not use this allocator is if you actually need to have all instances of something be a subclass of RubyObject.
REIFYING_OBJECT_ALLOCATOR ObjectAllocator

attach_to_object_space

attach_to_object_space ( )
Java: attachToObjectSpace()

Will make sure that this object is added to the current object space.

call_init

call_init ( IRubyObject[] args, Block block )
Java: callInit(org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

Call the Ruby initialize method with the supplied arguments and block.

nametypedescription
argsorg.jruby.runtime.builtin.IRubyObject[]args
blockorg.jruby.runtime.Blockblock

call_init

call_init ( Block block )
Java: callInit(org.jruby.runtime.Block block)

Call the Ruby initialize method with the supplied arguments and block.

nametypedescription
blockorg.jruby.runtime.Blockblock

call_init

call_init ( IRubyObject arg0, Block block )
Java: callInit(org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

Call the Ruby initialize method with the supplied arguments and block.

nametypedescription
arg0org.jruby.runtime.builtin.IRubyObjectarg0
blockorg.jruby.runtime.Blockblock

call_init

call_init ( IRubyObject arg0, IRubyObject arg1, Block block )
Java: callInit(org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

Call the Ruby initialize method with the supplied arguments and block.

nametypedescription
arg0org.jruby.runtime.builtin.IRubyObjectarg0
arg1org.jruby.runtime.builtin.IRubyObjectarg1
blockorg.jruby.runtime.Blockblock

call_init

call_init ( IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: callInit(org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

call_init

call_init ( ThreadContext context, IRubyObject[] args, Block block )
Java: callInit(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

call_init

call_init ( ThreadContext context, Block block )
Java: callInit(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

call_init

call_init ( ThreadContext context, IRubyObject arg0, Block block )
Java: callInit(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

call_init

call_init ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block )
Java: callInit(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

call_init

call_init ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: callInit(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

convert_to_type

IRubyObject convert_to_type ( RubyClass target, int convert_method_index )
Java: convertToType(org.jruby.RubyClass target, int convertMethodIndex)

equals

boolean equals ( Object other )
Java: equals(Object other)

This override does not do a "checked" dispatch.

hash_code

int hash_code ( )
Java: hashCode()

This override does not do "checked" dispatch since Object usually has #hash defined.

Returns: the hash code

op_eqq

IRubyObject op_eqq ( ThreadContext context, IRubyObject other )
Java: op_eqq(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject other)

rb_equal The Ruby "===" method is used by default in case/when statements. The Object implementation first checks Java identity equality and then calls the "==" method too.

specific_eval

IRubyObject specific_eval ( ThreadContext context, RubyModule mod, IRubyObject[] args, Block block, EvalType eval_type )
Java: specificEval(org.jruby.runtime.ThreadContext context, org.jruby.RubyModule mod, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block, org.jruby.EvalType evalType)

to_ruby_string

RubyString to_ruby_string ( ThreadContext context )
Java: toRubyString(org.jruby.runtime.ThreadContext context)

The default toString method is just a wrapper that calls the Ruby "to_s" method. This will raise if it is not actually a Ruby String.

nametypedescription
contextorg.jruby.runtime.ThreadContextthread context this is executing on.

Returns: the string.

from RubyIO

fieldtypenote
CLOSED_STREAM_MSG String
FD_CLOEXEC int
PARAGRAPH_SEPARATOR ByteList

add_blocking_thread

add_blocking_thread ( RubyThread thread )
Java: addBlockingThread(org.jruby.RubyThread thread)

Add a thread to the list of blocking threads for this IO.

nametypedescription
threadorg.jruby.RubyThreadA thread blocking on this IO

advise

IRubyObject advise ( ThreadContext context, IRubyObject[] argv )
Java: advise(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv)

autoclose

IRubyObject autoclose ( ThreadContext context )
Java: autoclose(org.jruby.runtime.ThreadContext context)

autoclose=

autoclose= ( boolean autoclose )
Java: setAutoclose(boolean autoclose) · also: set_autoclose

autoclose?

boolean autoclose? ( )
Java: isAutoclose() · also: is_autoclose

autoclose_set

IRubyObject autoclose_set ( ThreadContext context, IRubyObject autoclose )
Java: autoclose_set(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject autoclose)

binmode

IRubyObject binmode ( )
Java: binmode()
Deprecated. Use RubyIO#binmode(ThreadContext) instead.

binmode

IRubyObject binmode ( ThreadContext context )
Java: binmode(org.jruby.runtime.ThreadContext context)

blocking

boolean blocking ( )
Java: getBlocking() · also: get_blocking

blocking=

blocking= ( boolean blocking )
Java: setBlocking(boolean blocking) · also: set_blocking

bom

boolean bom ( )
Java: getBOM() · also: get_bom

bom=

bom= ( boolean bom )
Java: setBOM(boolean bom) · also: set_bom

bytes

IRubyObject bytes ( ThreadContext context, Block block )
Java: bytes(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

channel

Channel channel ( )
Java: getChannel() · also: get_channel

Get the underlying channel from this IO object. Note that IO buffers data internally, so the channel returned here may have been read into those buffers. If the channel and the IO are both being used at the same time, the stream will get out of sync.

Returns: the underlying channel for this IO

chars

IRubyObject chars ( ThreadContext context, Block block )
Java: chars(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

close

IRubyObject close ( ThreadContext context )
Java: close(org.jruby.runtime.ThreadContext context)

Closes all open resources for the IO. It also removes it from our magical all open file descriptor pool.

Returns: The IO. Returns nil if the IO was already closed. MRI: rb_io_close_m

close

close ( )
Java: close()

close_on_exec_p

IRubyObject close_on_exec_p ( ThreadContext context )
Java: close_on_exec_p(org.jruby.runtime.ThreadContext context)

close_on_exec_set

IRubyObject close_on_exec_set ( ThreadContext context, IRubyObject arg )
Java: close_on_exec_set(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg)

close_read

IRubyObject close_read ( ThreadContext context )
Java: close_read(org.jruby.runtime.ThreadContext context)

close_write

IRubyObject close_write ( ThreadContext context )
Java: close_write(org.jruby.runtime.ThreadContext context)

closed?

boolean closed? ( )
Java: isClosed() · also: is_closed

Is this IO closed MRI: rb_io_closed

Returns: true if closed

closed_p

RubyBoolean closed_p ( ThreadContext context )
Java: closed_p(org.jruby.runtime.ThreadContext context)

codepoints

IRubyObject codepoints ( ThreadContext context, Block block )
Java: codepoints(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

do_read_nonblock

IRubyObject do_read_nonblock ( ThreadContext context, IRubyObject arg0, boolean exception )
Java: doReadNonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, boolean exception)

do_read_nonblock

IRubyObject do_read_nonblock ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, boolean exception )
Java: doReadNonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, boolean exception)

do_read_nonblock

IRubyObject do_read_nonblock ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, boolean exception )
Java: doReadNonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, boolean exception)

do_read_nonblock

IRubyObject do_read_nonblock ( ThreadContext context, IRubyObject[] args, boolean exception )
Java: doReadNonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, boolean exception)

do_write_nonblock

IRubyObject do_write_nonblock ( ThreadContext context, IRubyObject[] argv, boolean use_exception )
Java: doWriteNonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv, boolean useException)

each

IRubyObject each ( ThreadContext context, Block block )
Java: each(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each

IRubyObject each ( ThreadContext context, IRubyObject arg0, Block block )
Java: each(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

each

IRubyObject each ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block )
Java: each(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

each

IRubyObject each ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: each(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

each

IRubyObject each ( ThreadContext context, IRubyObject[] args, Block block )
Java: each(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

each_byte

IRubyObject each_byte ( ThreadContext context, Block block )
Java: each_byte(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each_byte_internal

IRubyObject each_byte_internal ( ThreadContext context, Block block )
Java: each_byteInternal(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

Invoke a block for each byte.

MRI: rb_io_each_byte

each_char

IRubyObject each_char ( ThreadContext context, Block block )
Java: each_char(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each_char_internal

IRubyObject each_char_internal ( ThreadContext context, Block block )
Java: each_charInternal(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each_codepoint

IRubyObject each_codepoint ( ThreadContext context, Block block )
Java: each_codepoint(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each_line

IRubyObject each_line ( ThreadContext context, Block block )
Java: each_line(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

each_line

IRubyObject each_line ( ThreadContext context, IRubyObject arg0, Block block )
Java: each_line(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.Block block)

each_line

IRubyObject each_line ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, Block block )
Java: each_line(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.Block block)

each_line

IRubyObject each_line ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block )
Java: each_line(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2, org.jruby.runtime.Block block)

each_line

IRubyObject each_line ( ThreadContext context, IRubyObject[] args, Block block )
Java: each_line(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args, org.jruby.runtime.Block block)

ecflags

int ecflags ( )
Java: getEcflags() · also: get_ecflags

ecflags=

ecflags= ( int ecflags )
Java: setEcflags(int ecflags) · also: set_ecflags

ecopts

IRubyObject ecopts ( )
Java: getEcopts() · also: get_ecopts

ecopts=

ecopts= ( IRubyObject ecopts )
Java: setEcopts(org.jruby.runtime.builtin.IRubyObject ecopts) · also: set_ecopts

enc

Encoding enc ( )
Java: getEnc() · also: get_enc

enc2

Encoding enc2 ( )
Java: getEnc2() · also: get_enc2

enc2=

enc2= ( Encoding enc2 )
Java: setEnc2(org.jcodings.Encoding enc2) · also: set_enc2

enc=

enc= ( Encoding enc )
Java: setEnc(org.jcodings.Encoding enc) · also: set_enc

eof_p

RubyBoolean eof_p ( ThreadContext context )
Java: eof_p(org.jruby.runtime.ThreadContext context)

external_encoding

IRubyObject external_encoding ( ThreadContext context )
Java: external_encoding(org.jruby.runtime.ThreadContext context)

fcntl

IRubyObject fcntl ( ThreadContext context, IRubyObject cmd )
Java: fcntl(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject cmd)

fcntl

IRubyObject fcntl ( ThreadContext context, IRubyObject cmd, IRubyObject arg )
Java: fcntl(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject cmd, org.jruby.runtime.builtin.IRubyObject arg)

fileno

RubyFixnum fileno ( ThreadContext context )
Java: fileno(org.jruby.runtime.ThreadContext context)

flush

RubyIO flush ( ThreadContext context )
Java: flush(org.jruby.runtime.ThreadContext context)

Flushes the IO output stream. MRI: rb_io_flush

Returns: The IO.

flush

flush ( )
Java: flush()

fsync

RubyFixnum fsync ( ThreadContext context )
Java: fsync(org.jruby.runtime.ThreadContext context)

get_byte

int get_byte ( ThreadContext context )
Java: getByte(org.jruby.runtime.ThreadContext context)

get_write_io

RubyIO get_write_io ( )
Java: GetWriteIO()

getbyte

IRubyObject getbyte ( ThreadContext context )
Java: getbyte(org.jruby.runtime.ThreadContext context)

Read a byte. On EOF returns nil.

getc

IRubyObject getc ( )
Java: getc()

getc

IRubyObject getc ( ThreadContext context )
Java: getc(org.jruby.runtime.ThreadContext context)

getline

IRubyObject getline ( ThreadContext context, IRubyObject separator )
Java: getline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject separator)

getline

IRubyObject getline ( ThreadContext context, IRubyObject separator, long limit )
Java: getline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject separator, long limit)

getline using logic of gets. If limit is -1 then read unlimited amount.

getline

IRubyObject getline ( Ruby runtime, ByteList separator )
Java: getline(org.jruby.Ruby runtime, org.jruby.util.ByteList separator)

getline

IRubyObject getline ( Ruby runtime, ByteList separator, long limit )
Java: getline(org.jruby.Ruby runtime, org.jruby.util.ByteList separator, long limit)

getline

IRubyObject getline ( ThreadContext context, ByteList separator )
Java: getline(org.jruby.runtime.ThreadContext context, org.jruby.util.ByteList separator)

getline

IRubyObject getline ( ThreadContext context, ByteList separator, long limit )
Java: getline(org.jruby.runtime.ThreadContext context, org.jruby.util.ByteList separator, long limit)

gets

IRubyObject gets ( ThreadContext context )
Java: gets(org.jruby.runtime.ThreadContext context)

Read a line.

gets

IRubyObject gets ( ThreadContext context, IRubyObject arg )
Java: gets(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg)

gets

IRubyObject gets ( ThreadContext context, IRubyObject rs, IRubyObject limit_arg )
Java: gets(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject rs, org.jruby.runtime.builtin.IRubyObject limit_arg)

gets

IRubyObject gets ( ThreadContext context, IRubyObject rs, IRubyObject limit_arg, IRubyObject opt )
Java: gets(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject rs, org.jruby.runtime.builtin.IRubyObject limit_arg, org.jruby.runtime.builtin.IRubyObject opt)

in_stream

InputStream in_stream ( )
Java: getInStream() · also: get_in_stream

initialize

IRubyObject initialize ( ThreadContext context, IRubyObject file_number, Block unused )
Java: initialize(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject fileNumber, org.jruby.runtime.Block unused)

initialize

IRubyObject initialize ( ThreadContext context, IRubyObject file_number, IRubyObject second, Block unused )
Java: initialize(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject fileNumber, org.jruby.runtime.builtin.IRubyObject second, org.jruby.runtime.Block unused)

initialize

IRubyObject initialize ( ThreadContext context, IRubyObject file_number, IRubyObject mode_value, IRubyObject options, Block unused )
Java: initialize(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject fileNumber, org.jruby.runtime.builtin.IRubyObject modeValue, org.jruby.runtime.builtin.IRubyObject options, org.jruby.runtime.Block unused)

initialize_copy

IRubyObject initialize_copy ( ThreadContext context, IRubyObject _io )
Java: initialize_copy(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject _io)

input_encoding

Encoding input_encoding ( )
Java: getInputEncoding() · also: get_input_encoding

internal_encoding

IRubyObject internal_encoding ( ThreadContext context )
Java: internal_encoding(org.jruby.runtime.ThreadContext context)

ioctl

IRubyObject ioctl ( ThreadContext context, IRubyObject[] args )
Java: ioctl(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

lineno

RubyFixnum lineno ( ThreadContext context )
Java: lineno(org.jruby.runtime.ThreadContext context)

Returns the current line number.

Returns: the current line number.

lineno_set

RubyFixnum lineno_set ( ThreadContext context, IRubyObject new_line_number )
Java: lineno_set(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject newLineNumber)

Sets the current line number.

nametypedescription
new_line_numberorg.jruby.runtime.builtin.IRubyObjectThe new line number.

lines

IRubyObject lines ( ThreadContext context, Block block )
Java: lines(org.jruby.runtime.ThreadContext context, org.jruby.runtime.Block block)

make_open_file

OpenFile make_open_file ( )
Java: MakeOpenFile()

native_class_index

ClassIndex native_class_index ( )
Java: getNativeClassIndex() · also: get_native_class_index

op_append

IRubyObject op_append ( ThreadContext context, IRubyObject an_object )
Java: op_append(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject anObject)

rb_io_addstr

op_binmode

IRubyObject op_binmode ( ThreadContext context )
Java: op_binmode(org.jruby.runtime.ThreadContext context)

open_file

OpenFile open_file ( )
Java: getOpenFile() · also: get_open_file

open_file_checked

OpenFile open_file_checked ( )
Java: getOpenFileChecked() · also: get_open_file_checked

open_file_initialized

OpenFile open_file_initialized ( )
Java: getOpenFileInitialized() · also: get_open_file_initialized

out_stream

OutputStream out_stream ( )
Java: getOutStream() · also: get_out_stream

path

String path ( )
Java: getPath() · also: get_path

pid

IRubyObject pid ( ThreadContext context )
Java: pid(org.jruby.runtime.ThreadContext context)

Return the process id (pid) of the process this IO object spawned. If no process exists (popen was not called), then nil is returned. This is not how it appears to be defined but ruby 1.8 works this way.

Returns: the pid or nil

pos

RubyFixnum pos ( ThreadContext context )
Java: pos(org.jruby.runtime.ThreadContext context)

pos_set

RubyFixnum pos_set ( ThreadContext context, IRubyObject offset )
Java: pos_set(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject offset)

pread

IRubyObject pread ( ThreadContext context, IRubyObject len, IRubyObject offset )
Java: pread(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject len, org.jruby.runtime.builtin.IRubyObject offset)

pread

IRubyObject pread ( ThreadContext context, IRubyObject _length, IRubyObject _from, IRubyObject str )
Java: pread(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject _length, org.jruby.runtime.builtin.IRubyObject _from, org.jruby.runtime.builtin.IRubyObject str)

print

IRubyObject print ( ThreadContext context, IRubyObject[] args )
Java: print(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

Print some objects to the stream.

print

IRubyObject print ( ThreadContext context )
Java: print(org.jruby.runtime.ThreadContext context)

print

IRubyObject print ( ThreadContext context, IRubyObject arg0 )
Java: print(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

print

IRubyObject print ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: print(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

print

IRubyObject print ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: print(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

printf

IRubyObject printf ( ThreadContext context, IRubyObject[] args )
Java: printf(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

putc

IRubyObject putc ( ThreadContext context, IRubyObject ch )
Java: putc(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject ch)

puts

IRubyObject puts ( ThreadContext context )
Java: puts(org.jruby.runtime.ThreadContext context)

puts

IRubyObject puts ( ThreadContext context, IRubyObject arg0 )
Java: puts(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

puts

IRubyObject puts ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: puts(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

puts

IRubyObject puts ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: puts(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

puts

IRubyObject puts ( ThreadContext context, IRubyObject[] args )
Java: puts(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

pwrite

IRubyObject pwrite ( ThreadContext context, IRubyObject str, IRubyObject offset )
Java: pwrite(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject str, org.jruby.runtime.builtin.IRubyObject offset)

read

IRubyObject read ( IRubyObject[] args )
Java: read(org.jruby.runtime.builtin.IRubyObject[] args)

read

IRubyObject read ( ThreadContext context, IRubyObject[] args )
Java: read(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

read

IRubyObject read ( ThreadContext context )
Java: read(org.jruby.runtime.ThreadContext context)

Read all available bytes. Equivalent to io_read with no arguments.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context

Returns: the output buffer viewing the actual range of bytes read

read

IRubyObject read ( ThreadContext context, IRubyObject length )
Java: read(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject length)

Read length bytes. Equivalent to io_read with a length argument.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
lengthorg.jruby.runtime.builtin.IRubyObjecta numeric value of the count of bytes to read

Returns: the output buffer viewing the actual range of bytes read

read

IRubyObject read ( ThreadContext context, IRubyObject length, IRubyObject maybe_str )
Java: read(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject length, org.jruby.runtime.builtin.IRubyObject maybeStr)

Read into the given buffer (or create a new one) reading length bytes. Equivalent to io_read.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
lengthorg.jruby.runtime.builtin.IRubyObjecta numeric value of the count of bytes to read
maybe_strorg.jruby.runtime.builtin.IRubyObjecta RubyString buffer or a nil to indicate a new buffer should be created

Returns: the output buffer viewing the actual range of bytes read

read

int read ( ThreadContext context, byte[] buffer, int start, int len )
Java: read(org.jruby.runtime.ThreadContext context, byte[] buffer, int start, int len)

Read into the given buffer starting from start and reading len bytes. Equivalent to io_read with target byte[] buffer already in hand.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
bufferbyte[]the target buffer
startintstart offset in target buffer
lenintcount of bytes to read

Returns: the number of bytes actually read or -1 for EOF

read_encoding

Encoding read_encoding ( )
Java: getReadEncoding() · also: get_read_encoding

read_nonblock

IRubyObject read_nonblock ( ThreadContext context, IRubyObject arg0 )
Java: read_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

read_nonblock

IRubyObject read_nonblock ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: read_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

read_nonblock

IRubyObject read_nonblock ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: read_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

read_nonblock

IRubyObject read_nonblock ( ThreadContext context, IRubyObject[] args )
Java: read_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

readbyte

IRubyObject readbyte ( ThreadContext context )
Java: readbyte(org.jruby.runtime.ThreadContext context)

readchar

IRubyObject readchar ( ThreadContext context )
Java: readchar(org.jruby.runtime.ThreadContext context)

Read a char. On EOF throw EOFError.

readchar

IRubyObject readchar ( )
Java: readchar()

readline

IRubyObject readline ( ThreadContext context )
Java: readline(org.jruby.runtime.ThreadContext context)

Read a line.

readline

IRubyObject readline ( ThreadContext context, IRubyObject separator )
Java: readline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject separator)

readline

IRubyObject readline ( ThreadContext context, IRubyObject separator, IRubyObject limit )
Java: readline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject separator, org.jruby.runtime.builtin.IRubyObject limit)

readline

IRubyObject readline ( ThreadContext context, IRubyObject separator, IRubyObject limit, IRubyObject opts )
Java: readline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject separator, org.jruby.runtime.builtin.IRubyObject limit, org.jruby.runtime.builtin.IRubyObject opts)

readline

IRubyObject readline ( ThreadContext context, IRubyObject[] args )
Java: readline(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

readlines

RubyArray readlines ( ThreadContext context )
Java: readlines(org.jruby.runtime.ThreadContext context)

readlines

RubyArray readlines ( ThreadContext context, IRubyObject arg0 )
Java: readlines(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

readlines

RubyArray readlines ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: readlines(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

readlines

RubyArray readlines ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: readlines(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

readlines

RubyArray readlines ( ThreadContext context, IRubyObject[] args )
Java: readlines(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

readpartial

IRubyObject readpartial ( ThreadContext context, IRubyObject arg0 )
Java: readpartial(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

readpartial

IRubyObject readpartial ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: readpartial(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

readpartial

IRubyObject readpartial ( ThreadContext context, IRubyObject[] args )
Java: readpartial(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

remove_blocking_thread

remove_blocking_thread ( RubyThread thread )
Java: removeBlockingThread(org.jruby.RubyThread thread)

Remove a thread from the list of blocking threads for this IO.

nametypedescription
threadorg.jruby.RubyThreadA thread blocking on this IO

reopen

IRubyObject reopen ( ThreadContext context, IRubyObject[] args )
Java: reopen(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

rewind

RubyFixnum rewind ( ThreadContext context )
Java: rewind(org.jruby.runtime.ThreadContext context)

seek

RubyFixnum seek ( ThreadContext context, IRubyObject[] args )
Java: seek(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

seek

RubyFixnum seek ( ThreadContext context, IRubyObject off )
Java: seek(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject off)

seek

RubyFixnum seek ( ThreadContext context, IRubyObject off, IRubyObject whence )
Java: seek(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject off, org.jruby.runtime.builtin.IRubyObject whence)

set_encoding

IRubyObject set_encoding ( ThreadContext context, IRubyObject encoding_obj )
Java: set_encoding(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject encodingObj)

set_encoding

IRubyObject set_encoding ( ThreadContext context, IRubyObject encoding_string, IRubyObject internal_encoding )
Java: set_encoding(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject encodingString, org.jruby.runtime.builtin.IRubyObject internalEncoding)

set_encoding

IRubyObject set_encoding ( ThreadContext context, IRubyObject encoding_string, IRubyObject internal_encoding, IRubyObject options )
Java: set_encoding(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject encodingString, org.jruby.runtime.builtin.IRubyObject internalEncoding, org.jruby.runtime.builtin.IRubyObject options)

set_encoding

set_encoding ( ThreadContext context, IRubyObject v1, IRubyObject v2, IRubyObject opt )
Java: setEncoding(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject v1, org.jruby.runtime.builtin.IRubyObject v2, org.jruby.runtime.builtin.IRubyObject opt)

set_encoding_by_bom

IRubyObject set_encoding_by_bom ( ThreadContext context )
Java: set_encoding_by_bom(org.jruby.runtime.ThreadContext context)

stat

IRubyObject stat ( ThreadContext context )
Java: stat(org.jruby.runtime.ThreadContext context)

sync

RubyBoolean sync ( ThreadContext context )
Java: sync(org.jruby.runtime.ThreadContext context)

Returns the current sync mode. MRI: rb_io_sync

Returns: the current sync mode.

sync

boolean sync ( )
Java: getSync() · also: get_sync

sync=

sync= ( boolean sync )
Java: setSync(boolean sync) · also: set_sync

sync_set

IRubyObject sync_set ( IRubyObject sync )
Java: sync_set(org.jruby.runtime.builtin.IRubyObject sync)
Deprecated. Use RubyIO#sync_set(ThreadContext, IRubyObject) instead.

sync_set

IRubyObject sync_set ( ThreadContext context, IRubyObject sync )
Java: sync_set(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject sync)

Sets the current sync mode. MRI: rb_io_set_sync

nametypedescription
syncorg.jruby.runtime.builtin.IRubyObjectThe new sync mode.

sysread

IRubyObject sysread ( ThreadContext context, IRubyObject _length )
Java: sysread(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject _length)

sysread

IRubyObject sysread ( ThreadContext context, IRubyObject _length, IRubyObject _str )
Java: sysread(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject _length, org.jruby.runtime.builtin.IRubyObject _str)

sysread

IRubyObject sysread ( ThreadContext context, IRubyObject[] args )
Java: sysread(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

sysseek

RubyFixnum sysseek ( ThreadContext context, IRubyObject[] args )
Java: sysseek(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

syswrite

IRubyObject syswrite ( ThreadContext context, IRubyObject str )
Java: syswrite(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject str)

to_io

RubyIO to_io ( )
Java: to_io()

tty_p

RubyBoolean tty_p ( ThreadContext context )
Java: tty_p(org.jruby.runtime.ThreadContext context)

ungetbyte

IRubyObject ungetbyte ( ThreadContext context, IRubyObject b )
Java: ungetbyte(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject b)

ungetc

IRubyObject ungetc ( ThreadContext context, IRubyObject c )
Java: ungetc(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject c)

wait

IRubyObject wait ( ThreadContext context, IRubyObject[] argv )
Java: wait(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv)

wait_readable

IRubyObject wait_readable ( ThreadContext context, IRubyObject[] argv )
Java: wait_readable(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv)

wait_writable

IRubyObject wait_writable ( ThreadContext context, IRubyObject[] argv )
Java: wait_writable(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv)

waits until input available or timed out and returns self, or nil when EOF reached.

write

IRubyObject write ( ThreadContext context, IRubyObject str )
Java: write(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject str)

Ruby method IO#write(str), equivalent to io_write_m.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
strorg.jruby.runtime.builtin.IRubyObjectthe string to write

write

IRubyObject write ( ThreadContext context, IRubyObject[] args )
Java: write(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] args)

Ruby method IO#write(str, ...), equivalent to io_write_m.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
argsorg.jruby.runtime.builtin.IRubyObject[]the strings to write

write

IRubyObject write ( ThreadContext context, int ch )
Java: write(org.jruby.runtime.ThreadContext context, int ch)

Write a single byte to this IO's write target.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
chintthe byte to write, as an int

Returns: the count of bytes written

write

write ( ThreadContext context, byte ch )
Java: write(org.jruby.runtime.ThreadContext context, byte ch)

Write a single byte to this IO's write target but do not return the number of bytes written (it will be 1). This version does not dig out any wrapped write IO (bytes will be written to this IO).

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
chbytethe byte to write, as an int

write

IRubyObject write ( ThreadContext context, IRubyObject str, boolean nosync )
Java: write(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject str, boolean nosync)

Write the given range of bytes to this IO's write target. Equivalent to io_write.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
strorg.jruby.runtime.builtin.IRubyObjectthe string to write
nosyncbooleanwhether to write without syncing

Returns: the count of bytes written

write

int write ( ThreadContext context, byte[] bytes, int start, int length, Encoding encoding )
Java: write(org.jruby.runtime.ThreadContext context, byte[] bytes, int start, int length, org.jcodings.Encoding encoding)

Write the given range of bytes to this IO. Equivalent to io_write_m with source bytes and no digging out any wrapped write IO (bytes will be written to this IO).

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
bytesbyte[]the bytes to write
startintstart offset for writing
lengthintlength to write
encodingorg.jcodings.Encodingencoding of the bytes (will not be verified)

Returns: the count of bytes written

write

int write ( ThreadContext context, byte[] bytes, int start, int length, Encoding encoding, boolean nosync )
Java: write(org.jruby.runtime.ThreadContext context, byte[] bytes, int start, int length, org.jcodings.Encoding encoding, boolean nosync)

Write the given range of bytes to this IO. Equivalent to io_write with source bytes and no digging out any wrapped write IO (bytes will be written to this IO.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
bytesbyte[]the bytes to write
startintstart offset for writing
lengthintlength to write
encodingorg.jcodings.Encodingencoding of the bytes (will not be verified)
nosyncbooleanwhether to write without syncing

Returns: the count of bytes written

write

int write ( byte[] bytes, int start, int length, Encoding encoding, boolean nosync )
Java: write(byte[] bytes, int start, int length, org.jcodings.Encoding encoding, boolean nosync)

Same as #write(ThreadContext, byte[], int, int, Encoding, boolean) but context will be retrieved. Heavy use should retrieve context once and call the original method to avoid thread-local overhead.

nametypedescription
bytesbyte[]the bytes to write
startintstart offset for writing
lengthintlength to write
encodingorg.jcodings.Encodingencoding of the bytes (will not be verified)
nosyncbooleanwhether to write without syncing

Returns: the count of bytes written

write

int write ( byte[] bytes, int start, int length, Encoding encoding )
Java: write(byte[] bytes, int start, int length, org.jcodings.Encoding encoding)

Same as #write(ThreadContext, byte[], int, int, Encoding, boolean) but context will be retrieved and nosync defaults to false. Heavy use should retrieve context once and call the original method to avoid thread-local overhead.

nametypedescription
bytesbyte[]the bytes to write
startintstart offset for writing
lengthintlength to write
encodingorg.jcodings.Encodingencoding of the bytes (will not be verified)

Returns: the count of bytes written

write

int write ( byte[] bytes, Encoding encoding )
Java: write(byte[] bytes, org.jcodings.Encoding encoding)

Same as #write(ThreadContext, byte[], int, int, Encoding, boolean) but context will be retrieved nosync defaults to false, and the entire byte array will be written. Heavy use should retrieve context once and call the original method to avoid thread-local overhead.

nametypedescription
bytesbyte[]the bytes to write
encodingorg.jcodings.Encodingencoding of the bytes (will not be verified)

Returns: the count of bytes written

write

write ( int bite )
Java: write(int bite)

Same as #write(ThreadContext, byte) but context will be retrieved. Heavy use should retrieve context once and call the original method to avoid thread-local overhead.

nametypedescription
biteintthe byte to write, as an int

write2

IRubyObject write2 ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: write2(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

Ruby method IO#write(str, ...), equivalent to io_write_m.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
arg0org.jruby.runtime.builtin.IRubyObjectthe first string to write
arg1org.jruby.runtime.builtin.IRubyObjectthe second string to write

write3

IRubyObject write3 ( ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2 )
Java: write3(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1, org.jruby.runtime.builtin.IRubyObject arg2)

Ruby method IO#write(str, ...), equivalent to io_write_m.

nametypedescription
contextorg.jruby.runtime.ThreadContextthe current context
arg0org.jruby.runtime.builtin.IRubyObjectthe first string to write
arg1org.jruby.runtime.builtin.IRubyObjectthe second string to write
arg2org.jruby.runtime.builtin.IRubyObjectthe third string to write

write_nonblock

IRubyObject write_nonblock ( ThreadContext context, IRubyObject arg0 )
Java: write_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0)

write_nonblock

IRubyObject write_nonblock ( ThreadContext context, IRubyObject arg0, IRubyObject arg1 )
Java: write_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject arg0, org.jruby.runtime.builtin.IRubyObject arg1)

write_nonblock

IRubyObject write_nonblock ( ThreadContext context, IRubyObject[] argv )
Java: write_nonblock(org.jruby.runtime.ThreadContext context, org.jruby.runtime.builtin.IRubyObject[] argv)